Template:Eyecatch/doc: Difference between revisions

m
I prefer the examples to be in code boxes, no frilly highlighting.
mNo edit summary
m (I prefer the examples to be in code boxes, no frilly highlighting.)
 
Line 1: Line 1:
{{TOCright}}
{{TOCright}}
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, <info> is not word-wrapped.}}
{{eyecatch|1|New|Subtle one-pixel border added, padding improved, <info> is not word-wrapped.}}
Line 6: Line 7:
==Syntax==
==Syntax==
The template can have '''2''' or '''3 parameters''':
The template can have '''2''' or '''3 parameters''':
#{{m|<nowiki>eyecatch|<info>|<text></nowiki>}} - Default mode, no indentation.
#{{m|eyecatch|<info>|<text>}} - Default mode, no indentation.
#{{m|<nowiki>eyecatch|<#>|<info>|<text></nowiki>}} - Define indentation via <#> parameter.
#{{m|eyecatch|<#>|<info>|<text>}} - Define indentation via <#> parameter.
         '''<#>''' =  Number '''0''' (min) to '''6''' (max), defines indentation level.
         '''<#>''' =  Number '''0''' (min) to '''6''' (max), defines indentation level.
     '''<info>''' =  The info to highlight (not word-wrapped), i.e. ''Note'' or ''Important''.
     '''<info>''' =  The info to highlight (not word-wrapped), i.e. ''Note'' or ''Important''.
Line 15: Line 16:


==Examples==
==Examples==
* {{m|<nowiki>eyecatch|0|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.</nowiki>}}
<nowiki>{{eyecatch|0|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}</nowiki>
* {{m|<nowiki>eyecatch|abc|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.</nowiki>}}
<nowiki>{{eyecatch|abc|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}</nowiki>
* {{m|<nowiki>eyecatch||Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.</nowiki>}}
<nowiki>{{eyecatch||Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}</nowiki>
{{eyecatch|0|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}
{{eyecatch|0|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}


* {{m|<nowiki>eyecatch|1|Another note|'''One''' indentation, just like <tt>eyecatch2</tt>.</nowiki>}}
<nowiki>{{eyecatch|1|Another note|'''One''' indentation, just like <tt>eyecatch2</tt>.}}</nowiki>
{{eyecatch|1|Another note|'''One''' indentation, just like <tt>eyecatch2</tt>.}}
{{eyecatch|1|Another note|'''One''' indentation, just like <tt>eyecatch2</tt>.}}


* {{m|<nowiki>eyecatch|2|Important|Level '''two''' indentation!</nowiki>}}
<nowiki>{{eyecatch|2|Important|Level '''two''' indentation!}}</nowiki>
{{eyecatch|2|Important|Level '''two''' indentation!}}
{{eyecatch|2|Important|Level '''two''' indentation!}}


* {{m|<nowiki>eyecatch|6|Very important|Maximum indentation level of '''six'''! "Very important" is ...</nowiki>}}
<nowiki>{{eyecatch|6|Very important|Maximum indentation level of '''six'''! "Very important" is ...}}</nowiki>
{{eyecatch|6|Very important|Maximum indentation level of '''six'''! "Very important" is '''not''' word-wrapped.}}
{{eyecatch|6|Very important|Maximum indentation level of '''six'''! "Very important" is '''not''' word-wrapped.}}


==Test the Code==
==Test the Code==
Should more code testing be required see the [[Template:Eyecatch/Test Code]] page.
Should more code testing be required see the [[Template:Eyecatch/Test Code]] page.
1,633

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.