Template:WarningBox: Difference between revisions

From Zandronum Wiki
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}}}
|}

Revision as of 22:29, 2 January 2023

No description.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Border colourborder

CSS colour value for the border

Default
#000000
Lineoptional
Background colourbackground

CSS colour value for the background

Default
#FFFFFF
Lineoptional
Text colourcolor

CSS colour value for the text

Default
#000000
Lineoptional
Imageimage

Image file name

Filesuggested
Contentcontent

Wikitext content of the warning box

Contentrequired
  1. 000000; background-color:
  2. FFFFFF; color:
  3. 000000; padding: 0.4em 1em; width: 75%; margin: 1em auto; text-align: center; border-radius: 3px"
{{{content}}}