Template:WarningBox: Difference between revisions

no edit summary
No edit summary
No edit summary
Tag: Source edit
Line 1: Line 1:
<noinclude>
<noinclude>
This is a simple warning box.
<templatedata>
 
{
== Examples ==
"params": {
=== No custom header ===
"border": {
{{WarningBox|Hello, there!}}
"label": "Border colour",
=== Custom header ===
"description": "CSS colour value for the border",
{{WarningBox|Hello, there!|Greeting}}
"type": "line",
 
"default": "#000000"
== The template itself==
},
</noinclude><div style='background-color: khaki; border: 1px solid darkkhaki; padding: 0 5px;'>
"background": {
<div style='border-bottom: 1px solid darkkhaki;'>
"label": "Background colour",
<strong>{{#if:{{{2|}}}|{{{2}}}|Warning}}</strong>
"description": "CSS colour value for the background",
</div>
"type": "line",
<div>
"default": "#FFFFFF"
<table>
},
<tr>
"color": {
<td class='za-no-mobile'>
"label": "Text colour",
[[File:Unkna0.png]]
"description": "CSS colour value for the text",
</td>
"type": "line",
<td style='padding-left: 5px;'>
"default": "#000000"
{{{1}}}
},
</td>
"image": {
</tr>
"label": "Image",
</table>
"description": "Image file name",
</div>
"type": "wiki-file-name",
</div>
"suggested": true
},
"content": {
"label": "Content",
"description": "Wikitext content of the warning box",
"type": "content",
"required": true
}
},
"format": "block"
}
</templatedata>
</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"
|-
| {{#if: {{{image|}}}|[[{{{image}}}|46x46px]]}}
| {{{content}}}
|}