13,212
edits
(Finally getting to this) |
(Some further) |
||
Line 1: | Line 1: | ||
{| class="wikitable" <!-- Begin box --> | {| class="wikitable" <!-- Begin box --> | ||
| | | | ||
{{#switch: {{lc: {{{box|top}}} }} <!-- What type of box? --> | {{#switch: {{lc: {{{box|top}}} }} <!-- What type of box? --> | ||
| box = | | box = | ||
box | box | ||
Line 8: | Line 8: | ||
| top | | top | ||
| #default = | | #default = | ||
top | {{#ifeq: {{{box|top}}} | top <!-- Is there an unspecified or valid type of box specified? --> | ||
}};<!-- | | <!-- Yes, the type of box is unspecified or a valid type of box is specified --> | ||
-->{{#switch: {{lc: {{{style|notice}}} }} <!-- Which colours to use? --> | top | ||
| <!-- No, an invalid type of box is specified --> | |||
invalid box type | |||
}} | |||
}};<!-- | |||
-->{{#switch: {{lc: {{{style|notice}}} }} <!-- Which colours to use? --> | |||
| immediate = | | immediate = | ||
immediate | immediate | ||
Line 23: | Line 28: | ||
| notice | | notice | ||
| #default = | | #default = | ||
notice | {{#ifeq: {{{style|notice}}} | notice <!-- Is there an unspecified or valid type of box specified? --> | ||
}};<!-- | | <!-- Yes, the box style is unspecified or a valid box style is specified --> | ||
-->{{#if: {{{image|}}} <!-- Is there an image? --> | notice | ||
| | | <!-- No, an invalid box style is specified --> | ||
image | invalid box style | ||
| | }} | ||
}};<!-- | |||
-->{{#if: {{{image|}}} <!-- Is there an image? --> | |||
| <!-- Yes, there is an image --> | |||
{{#ifeq: {{IsNum| {{{image-width|1}}} }} | 1 <!-- Is there a valid or unspecified custom image width? --> | |||
| <!-- Yes, there is a valid or unspecified custom image width --> | |||
{{#if: {{{image-width|}}} <!-- Was there a custom image width specified? --> | |||
| <!-- Yes, use the specified custom image width --> | |||
custom image width | |||
| <!-- No custom image width specified, use standard widths --> | |||
{{#if: {{{oneliner|}}} <!-- Oneliner or not? (For image size) --> | |||
| | |||
standard oneliner image width | |||
| | |||
standard multiliner image width | |||
}} | |||
}};<!-- | |||
-->{{#switch: {{{image|}}} <!-- Is icon shortcuts used? --> | |||
| /!\ = | |||
/!\ | |||
| (!) = | |||
(!) | |||
| (?) = | |||
(?) | |||
| (i) = | |||
(i) | |||
| (x) = | |||
(x) | |||
| U = | |||
U | |||
| #default = <!-- Or is a custom image used?? --> | |||
{{#ifexist: File:{{{image|ai.png}}} <!-- Does the specified custom image exist? --> <!-- REMINDER: Remove File:ai.png link later on! --> | |||
| <!-- Yes, the specified image exist --> | |||
{{{image|image}}} | |||
| <!-- No the specified image does not exist --> | |||
non-existent image | |||
}} | |||
}} | |||
| <!-- No, an invalid custom image width was specified --> | |||
custom image width not a number | |||
}} | |||
| <!-- No there is no image --> | |||
no image | no image | ||
}};<!-- | |||
-->{{# | -->{{#if: {{{oneliner|}}} | ||
| <!-- Oneliner or not? (For text padding) --> | |||
oneliner text padding | |||
| <!-- Not a oneliner --> | | <!-- Not a oneliner --> | ||
multiliner text padding | |||
}};<!-- | |||
-->{{{title|title}}};<!-- | -->{{{title|title}}};<!-- | ||
-->{{{text|text}}} | -->{{{text|text}}} | ||
|} | |}<!-- End box | ||
<!-- End box | |||
--><!-- Snippet with automatic categorisation | --><!-- Snippet with automatic categorisation | ||
Line 72: | Line 113: | ||
<nowiki>|</nowiki> ''image'' = | <nowiki>|</nowiki> ''image'' = | ||
<nowiki>|</nowiki> ''image-width'' = | <nowiki>|</nowiki> ''image-width'' = | ||
<!-- | |||
Hiding these for a while | |||
<nowiki>|</nowiki> ''box-style'' = | <nowiki>|</nowiki> ''box-style'' = | ||
<nowiki>|</nowiki> ''text-style'' = | <nowiki>|</nowiki> ''text-style'' = | ||
<nowiki>|</nowiki> ''image-style'' = | <nowiki>|</nowiki> ''image-style'' = --> | ||
<nowiki>|</nowiki> ''page'' = | <nowiki>|</nowiki> ''page'' = | ||
Line 93: | Line 137: | ||
;style: Style of the messagebox. Valid values are '''immediate''', '''danger''', '''caution''', '''notice''', '''tip''' and '''protected'''. Defaults to '''notice'''. | ;style: Style of the messagebox. Valid values are '''immediate''', '''danger''', '''caution''', '''notice''', '''tip''' and '''protected'''. Defaults to '''notice'''. | ||
;one-liner: Makes the messagebox a one-liner if | ;one-liner: Makes the messagebox a one-liner if not empty. | ||
;image: Image or icon to use excluding the '''File:''' namespace prefix, for example '''Cleanup.png'''. Instead of an image name a shortcut can be used. When using the shortcuts the icons will automatically get the right colour for the style. Valid icon shortcuts are: '''/!\''', '''(!)''', '''(?)''', '''(i)''', '''(x)''' and '''U''' (for padlock). | ;image: Image or icon to use excluding the '''File:''' namespace prefix, for example '''Cleanup.png'''. Instead of an image name a shortcut can be used. When using the shortcuts the icons will automatically get the right colour for the style. Valid icon shortcuts are: '''/!\''', '''(!)''', '''(?)''', '''(i)''', '''(x)''' and '''U''' (for padlock). | ||
;image-width: Width of the image. Defaults to 40 pixels or for one-liners 24 pixels. | ;image-width: Width of the image in pixels. Defaults to 40 pixels or for one-liners 24 pixels. | ||
<!-- | |||
Hiding these for a while | |||
=== CSS Style parameters === | === CSS Style parameters === | ||
Line 106: | Line 153: | ||
;text-style: CSS attributes applied to the text cell. | ;text-style: CSS attributes applied to the text cell. | ||
;image-style: CSS attributes applied to the image cell. | ;image-style: CSS attributes applied to the image cell. --> | ||
=== Parameters for demonstration and testing === | === Parameters for demonstration and testing === |