Template:Ivory messagebox: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(fix)
(overhaul image-handling behaviour, which was horrid and clunky)
Line 1: Line 1:
{| class="messagebox" style="border: 1px solid #AAA; background: ivory; padding: 0.5em; width: 100%;"
{| class="messagebox" style="border: 1px solid #AAA; background: ivory; padding: 0.5em; width: 100%;"
{{#switch:{{{image}}}|yes=
{{{{{|safesubst:}}}#if:{{{2|}}}|
{{!}} valign="{{{valign|middle}}}" style="padding-left: {{{p-l|1px}}}; padding-right: {{{p-r|0.5em}}};" {{!}} {{{2|{{{image}}}}}}
{{!}} valign="{{{valign|middle}}}" style="padding-left: {{{p-l|1px}}}; padding-right: {{{p-r|0.5em}}};" {{!}} {{image|1={{{2|{{{image|Ambox_notice.svg}}}}}}|2={{{imagesize|{{{image size|{{{icon size|{{{iconsize|{{{isize|{{{i size|25px}}}}}}}}}}}}}}}}}}{{!}}link={{{image link|}}}{{!}}alt={{{image alt|{{{image caption|}}}}}}}}
{{!}} {{{1<includeonly>|Content of message.</includeonly>}}}|#default=
{{!}} {{{1<includeonly>|Content of message.</includeonly><noinclude>|{{Lorem ipsum}}</noinclude>}}}|
{{!}} {{{1<includeonly>|Content of message.</includeonly><noinclude>|{{Lorem ipsum}}</noinclude>}}}}}
{{!}} {{{1<includeonly>|Content of message.</includeonly><noinclude>|{{Lorem ipsum}}</noinclude>}}}}}
|}<noinclude>{{Documentation|content=The '''Ivory messagebox''' is a simplistic, full-width box intended to surround important messages or notices. {{tl|bold=yes|Ivmbox}} is an alias for this template. The ivory background of this template contrasts well to the white background used by most Wikipedia users on most Wikipedia pages; however, the background colour is not as garish as many other message boxes.
|}<noinclude>{{Documentation|content=The '''Ivory messagebox''' is a simplistic, full-width box intended to surround important messages or notices. {{tl|bold=yes|Ivmbox}} is an alias for this template. The ivory background of this template contrasts well to the white background used by most Wikipedia users on most Wikipedia pages; however, the background colour is not as garish as many other message boxes.
Line 8: Line 8:
The basic use of the template is as follows:
The basic use of the template is as follows:


{{tlx|ivmbox|Lorem ipsum}} which gives:
{{tlx|ivmbox|Lorem ipsum [etc…]}} which gives:
{{ivmbox|Lorem ipsum}}
{{ivmbox|{{Lorem ipsum}}}}


The template can display an image to the left of the text content. The image must be fed as full file code:
The template can display an image to the left of the text content. By default, the image will be 25px in width:


{{tlx|ivmbox|Lorem ipsum [etc…]|image=yes|<nowiki>[[File:Ambox notice.png|30px|center|link=|alt=]]</nowiki>}}
{{tlx|ivmbox|Lorem ipsum [etc…]|Ambox notice.svg}}
{{ivmbox|{{Lorem ipsum}}|image=yes|[[File:Ambox notice.png|30px|center|link=|alt=]]}}
{{ivmbox|{{Lorem ipsum}}|Ambox notice.svg}}

The image can be made smaller or larger using the {{para|imagesize}} parameter:

{{tlx|ivmbox|Lorem ipsum [etc…]|Ambox notice.svg|imagesize=40px}}
{{ivmbox|{{Lorem ipsum|2}}|Ambox notice.svg|imagesize=40px}}
}}[[Category:Wikipedia metatemplates]]</noinclude>
}}[[Category:Wikipedia metatemplates]]</noinclude>

Revision as of 00:57, February 12, 2013

Template:Lorem ipsum