Jump to content

Template:WarningBox: Difference between revisions

Add wikitable and textalign parameters
(Add imagelink parameter)
Tag: Source edit
(Add wikitable and textalign parameters)
Tag: Source edit
Line 1: Line 1:
<noinclude>
<noinclude>
== Template data ==
<templatedata>
<templatedata>
{
{
Line 43: Line 44:
"description": "Link the user will be sent to upon clicking the image",
"description": "Link the user will be sent to upon clicking the image",
"type": "url"
"type": "url"
},
"wikitable": {
"label": "Wikitable",
"description": "Use the wikitable class for the warning box. Disables all colour parameters.",
"type": "boolean",
"default": "false"
},
"textalign": {
"label": "Text alignment",
"description": "Text alignment of the content. One of: left, center, right",
"type": "line",
"default": "center"
}
}
},
},
"format": "block",
"format": "block",
"description": "Creates a customisable warning box",
"description": "A highly customisable warning box",
"paramOrder": [
"paramOrder": [
"content",
"content",
Line 52: Line 65:
"imagelink",
"imagelink",
"imagesize",
"imagesize",
"wikitable",
"color",
"color",
"background",
"background",
"border"
"border",
"textalign"
]
]
}
}
Line 114: Line 129:
| border = 41443A
| border = 41443A
| color = 000000
| color = 000000
}}
</li>
<li>
<pre><nowiki>{{WarningBox
| content = This article is a stub.
| wikitable = true
| textalign = left
}}</nowiki></pre>
becomes
{{WarningBox
| content = This article is a stub.
| wikitable = true
| textalign = left
}}
}}
</li>
</li>
Line 119: Line 148:


== The template itself ==
== The template itself ==
</noinclude>{| align=center border=0 cellpadding=4 cellspacing=4 style="border: solid 1px #{{#if: {{{border|}}} | {{{border}}} | 000000}}; background-color: #{{#if: {{{background|}}} | {{{background}}} | FFFFFF}}; color: #{{#if: {{{color|}}} | {{{color}}} | 000000}}; padding: 0.4em 1em; width: 75%; margin: 1em auto; text-align: center; border-radius: 3px"
</noinclude>{| align="center" border=0 cellpadding=4 cellspacing=4 {{#ifeq: {{{wikitable|}}} | true | class="wikitable" style=" | style="border: solid 1px #{{#if: {{{border|}}} | {{{border}}} | 000000}}; background-color: #{{#if: {{{background|}}} | {{{background}}} | FFFFFF}}; color: #{{#if: {{{color|}}} | {{{color}}} | 000000}}; }} padding: 0.4em 1em; width: 75%; margin: 1em auto; text-align: {{#if: {{{textalign|}}} | {{{textalign}}} | center}}; border-radius: 3px"
|-
|-
| style="width: {{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}px; {{#if: {{{image|}}} | | display:none}}" | {{#if: {{{image|}}} | [[File:{{{image}}}|{{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}x{{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}px|link={{{imagelink|}}}]] }}
| style="border:none; width: {{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}px; {{#if: {{{image|}}} | | display:none}}" | {{#if: {{{image|}}} | [[File:{{{image}}}|{{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}x{{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}px|link={{{imagelink|}}}]] }}
| {{{content}}}
| style="border: none" | {{{content}}}
|}
|}