Template:WarningBox: Difference between revisions

From Zandronum Wiki
No edit summary
Tag: Source edit
No edit summary
Tag: Source edit
Line 40: Line 40:
}
}
},
},
"format": "block"
"format": "block",
"description": "Creates a customisable warning box",
"paramOrder": [
"content",
"image",
"imagesize",
"color",
"background",
"border"
]
}
}
</templatedata>
</templatedata>


== Examples ==
== Examples ==
<ol>
<li>
<pre><nowiki>{{WarningBox
| content = Test
}}</nowiki></pre>
becomes
{{WarningBox
{{WarningBox
| content = Test
}}
</li>
<li>
<pre><nowiki>{{WarningBox
| image = Unkna0.png
| image = Unkna0.png
| content = Test
| content = Test
| background = EFEFEF
| background = EFEFEF
}}</nowiki></pre>
becomes
{{WarningBox
| image = Unkna0.png
| content = Test
| background = EFEFEF
}}
</li>
<li>
<pre><nowiki>{{WarningBox
| image = Za exe2 logo cropped.png
| content = This article documents a [[Zandronum]]-specific [[ACS]] feature which may not be supported by [[doomwiki:ZDoom|ZDoom]] and its other child ports.
| background = F0FFD1
| border = 41443A
| color = 000000
}}</nowiki></pre>
becomes
{{WarningBox
| image = Za exe2 logo cropped.png
| content = This article documents a [[Zandronum]]-specific [[ACS]] feature which may not be supported by [[doomwiki:ZDoom|ZDoom]] and its other child ports.
| background = F0FFD1
| border = 41443A
| color = 000000
}}
}}
</li>
</ol>


----
== 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 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"
|-
|-
| style="width: {{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}px" | {{#if: {{{image|}}} | [[File:{{{image}}}|{{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}x{{#if: {{{imagesize|}}} | {{{imagesize}}} | 46}}px]] }}
| 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]] }}
| {{{content}}}
| {{{content}}}
|}
|}

Revision as of 21:55, 2 January 2023

Creates a customisable warning box

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Contentcontent

Wikitext content of the warning box

Contentrequired
Imageimage

Image file name

Filesuggested
Image sizeimagesize

Pixel size of the image - this affects both width and height

Default
46
Numberoptional
Text colourcolor

Hex colour value for the text

Default
000000
Lineoptional
Background colourbackground

Hex colour value for the background

Default
FFFFFF
Lineoptional
Border colourborder

Hex colour value for the border

Default
000000
Lineoptional

Examples

  1. {{WarningBox
    | content = Test
    }}

    becomes

    Test
  2. {{WarningBox
    | image = Unkna0.png
    | content = Test
    | background = EFEFEF
    }}

    becomes

    Test
  3. {{WarningBox
    | image = Za exe2 logo cropped.png
    | content = This article documents a [[Zandronum]]-specific [[ACS]] feature which may not be supported by [[doomwiki:ZDoom|ZDoom]] and its other child ports.
    | background = F0FFD1
    | border = 41443A
    | color = 000000
    }}

    becomes

    This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

The template itself

{{{content}}}