1,633
edits
mNo edit summary |
|||
Line 4: | Line 4: | ||
==Documentation for this template== | ==Documentation for this template== | ||
This template creates an ''eye-catcher bar'' that can be indented up to '''6 times''' via parameter value, letting the user better customize his "Note"s. The code is backwards compatible, letting the user keep on using the old 2 parameter version as well. | This template creates an ''eye-catcher bar'' that can be indented up to '''6 times''' via parameter value, letting the user better customize his "Note"s. The code is backwards compatible, letting the user keep on using the old 2 parameter version as well. | ||
{{eyecatch|1|New|Subtle one-pixel border added, padding improved, < | {{eyecatch|1|New|Subtle one-pixel border added, padding improved, <weight> is not word-wrapped.}} | ||
==Alternative names== | ==Alternative names== | ||
* <tt><nowiki>{{catWeight|< | * <tt><nowiki>{{catWeight|<weight>|<text>}}</nowiki></tt> | ||
* <tt><nowiki>{{CatWeight|< | * <tt><nowiki>{{CatWeight|<weight>|<text>}}</nowiki></tt> - alternate spelling of template | ||
* <tt><nowiki>{{catWeight|<#>|< | * <tt><nowiki>{{catWeight|<#>|<weight>|<text>}}</nowiki></tt> | ||
* <tt><nowiki>{{CatWeight|<#>|< | * <tt><nowiki>{{CatWeight|<#>|<weight>|<text>}}</nowiki></tt> - alternate spelling of template | ||
==Syntax== | ==Syntax== | ||
The template can have '''2''' or '''3 parameters''': | The template can have '''2''' or '''3 parameters''': | ||
#'''<tt><nowiki>{{catWeight|< | #'''<tt><nowiki>{{catWeight|<weight>|<text>}}</nowiki></tt>''' - Default mode, no indentation. | ||
#'''<tt><nowiki>{{catWeight|<#>|< | #'''<tt><nowiki>{{catWeight|<#>|<weight>|<text>}}</nowiki></tt>''' - Define indentation via <#> parameter. | ||
'''<#>''' = Number '''0''' (min) to '''6''' (max), defines indentation level. | '''<#>''' = Number '''0''' (min) to '''6''' (max), defines indentation level. | ||
'''< | '''<weight>''' = The info to highlight (not word-wrapped), i.e. ''Note'' or ''Important''. | ||
'''<text>''' = The descriptive text for the info. | '''<text>''' = The descriptive text for the info. | ||
{{catWeight|1|Note|Only the '''<#>''' values '''1''' to '''6''' are actually checked, any '''other values''' (e.g. 0 or abc) yield '''no indentation''' at all, and are treated the same as <tt><nowiki>{{catWeight|info|text}}</nowiki></tt>!}} | {{catWeight|1|Note|Only the '''<#>''' values '''1''' to '''6''' are actually checked, any '''other values''' (e.g. 0 or abc) yield '''no indentation''' at all, and are treated the same as <tt><nowiki>{{catWeight|info|text}}</nowiki></tt>!}} | ||
{{catWeight|1|Note|The '''< | {{catWeight|1|Note|The '''<weight>''' parameter is intended for short message headers. To improve readability the '''word-wrapping''' is turned '''off'''!}} | ||
==Examples== | ==Examples== | ||
===The Weights=== | |||
{{catWeight|1|+ | Weight <tt>+ </tt> means this and that.}} | |||
{{catWeight|1|* | Weight <tt>* </tt> means this and that.}} | |||
{{catWeight|1|*+ | Weight <tt>*+ </tt> means this and that.}} | |||
{{catWeight|1|** | Weight <tt>** </tt> means this and that.}} | |||
{{catWeight|1|**+| Weight <tt>**+</tt> means this and that.}} | |||
{{catWeight|1|***| Weight <tt>***</tt> means this and that.}} | |||
===Indentation=== | |||
<nowiki>{{catWeight|0|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}</nowiki> | <nowiki>{{catWeight|0|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}</nowiki> | ||
<nowiki>{{catWeight|abc|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}</nowiki> | <nowiki>{{catWeight|abc|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}</nowiki> |
edits