Template:Separator: Difference between revisions
mNo edit summary |
Actually, no reason not to support custom width for the horizontal rule |
||
| Line 1: | Line 1: | ||
{{#if:{{{1|}}}|{{#if:{{{2|}}}|<div class="center">[[Image:Separator {{{1}}} left.png|{{{3|100px}}}]] {{{2}}} [[Image:Separator {{{1}}} right.png|{{{3|100px}}}]]</div>|[[Image:Separator {{{1}}}.png|{{{3|200px}}}|center]]}}|<hr style="width:33%; text-align: center; margin: 10px auto; height: 4px;" />}}<noinclude> | {{#if:{{{1|}}}|{{#if:{{{2|}}}|<div class="center">[[Image:Separator {{{1}}} left.png|{{{3|100px}}}]] {{{2}}} [[Image:Separator {{{1}}} right.png|{{{3|100px}}}]]</div>|[[Image:Separator {{{1}}}.png|{{{3|200px}}}|center]]}}|<hr style="width:{{{3|33%}}}; text-align: center; margin: 10px auto; height: 4px;" />}}<noinclude> | ||
Usage: | Usage: | ||
| Line 7: | Line 7: | ||
This template is used for producing separators with fancy dingbat images and text. It has three parameters. The first parameter defines which dingbat image set to use, the second is the text to insert into the dingbat, and the third can be used to adjust the size of the images away from the default. | This template is used for producing separators with fancy dingbat images and text. It has three parameters. The first parameter defines which dingbat image set to use, the second is the text to insert into the dingbat, and the third can be used to adjust the size of the images away from the default. | ||
When no dingbat identifier is given the template simply places a horizontal rule. This is intended as a fallback measure in case the template is used without parameters, it doesn't support the text | When no dingbat identifier is given the template simply places a horizontal rule. This is intended as a fallback measure in case the template is used without parameters, it doesn't support the text in this state (though you can specify width if you like - it defaults to 33%). | ||
Dingbat image sets come in threes and must be named with the following pattern: | Dingbat image sets come in threes and must be named with the following pattern: | ||
Latest revision as of 01:42, 31 August 2007
{{#if:|{{#if:|
|[[Image:Separator {{{1}}}.png|200px|center]]}}|
}}
Usage:
{{Separator|<identifier>|Optional text|optional image width}}
This template is used for producing separators with fancy dingbat images and text. It has three parameters. The first parameter defines which dingbat image set to use, the second is the text to insert into the dingbat, and the third can be used to adjust the size of the images away from the default.
When no dingbat identifier is given the template simply places a horizontal rule. This is intended as a fallback measure in case the template is used without parameters, it doesn't support the text in this state (though you can specify width if you like - it defaults to 33%).
Dingbat image sets come in threes and must be named with the following pattern:
- Separator <identifier>.png
- Separator <identifier> left.png
- Separator <identifier> right.png
Where <identifier> is an arbitrary string that's the same for all three images in the set.
Image width defaults to 200 pixels without text and 100 pixels with text. To override the width without setting text, use a double pipe to provide an "empty" text parameter, like so:
{{Separator|<identifier>||300px}}
The following table provides examples of image sets that are currently available.






