Template:MessageBox: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
(Create template)
 
(Improved documentation)
Line 1: Line 1:
<onlyinclude>{| class="messagebox" id="{{{3|messagebox}}}" style="border: 1px solid #A2A9B1; border-left-width: 10px; border-left-color: {{{color|#3366CC}}}; background-color: #FBFBFB;"
<noinclude>
== Format ==
This template should be used for messageboxes at the top of pages. It has these arguments
<pre>
{{MessageBox
  | 1 = The html id of the box
  | 2 = The title of the box
  | 3 = The text of the box
  | color = The color of the left side of the box
  | background-color = the color of the box background
  | image = The name of the image to use on the left (should be 40px)
}}
</pre>
== Examples ==
The style of these example boxes was [//simple.wikipedia.org/wiki/Template:Ambox#type copied from wikipedia]:
 
<pre>
{{MessageBox|notice|Notice|This is a notice.}}
</pre>
{{MessageBox|notice|Notice|This is a notice.}}
 
<pre>
{{MessageBox|style|Style|This article has style issues.|image=Edit-clear.png|color=#FFCC33}}
</pre>
{{MessageBox|style|Style|This article has style issues.|image=Edit-clear.png|color=#FFCC33}}
 
<pre>
{{MessageBox|content|Content|This article has content issues.|image=Ambox important.webp|color=#f28500}}
</pre>
{{MessageBox|content|Content|This article has content issues.|image=Ambox important.webp|color=#f28500}}
 
<pre>
{{MessageBox|speedy|Speedy Deletion|This article has been marked for speedy deletion.|image=Ambox warning pn.svg.png|color=#B32424|background-color=#FEE7E6|}}
</pre>
{{MessageBox|speedy|Speedy Deletion|This article has been marked for speedy deletion.|image=Ambox warning pn.svg.png|color=#B32424|background-color=#FEE7E6|}}
 
</noinclude><onlyinclude><includeonly>{| class="messagebox" id="{{{1|messagebox}}}" style="border: 1px solid #A2A9B1; border-left-width: 10px; border-left-color: {{{color|#3366CC}}}; background-color: {{{background-color|#FBFBFB}}};"
|-
|-
|align="center" width="5%"|[[Image:{{{image|warning.gif}}}|left|50px]]
|align="center" width="5%"|[[Image:{{{image|Information icon4.webp}}}|left|40px]]
|align="left" width="90%"|'''{{{1|Message}}}'''{{#if:{{{2|}}}<br>{{{2|}}}|}}
|align="left" width="90%"|'''{{{2|Message}}}'''<br>{{{3|}}}
|}
|}</includeonly></onlyinclude>
<includeonly>{{#if:{{{category|}}}|[[Category:{{{category|}}}]]</includeonly></onlyinclude>


[[Category:Templates]]
[[Category:Templates]]

Revision as of 04:59, 19 December 2023

Format

This template should be used for messageboxes at the top of pages. It has these arguments

{{MessageBox
   | 1 = The html id of the box
   | 2 = The title of the box
   | 3 = The text of the box
   | color = The color of the left side of the box
   | background-color = the color of the box background
   | image = The name of the image to use on the left (should be 40px)
}}

Examples

The style of these example boxes was copied from wikipedia:

{{MessageBox|notice|Notice|This is a notice.}}
Notice
This is a notice.
{{MessageBox|style|Style|This article has style issues.|image=Edit-clear.png|color=#FFCC33}}
Style
This article has style issues.
{{MessageBox|content|Content|This article has content issues.|image=Ambox important.webp|color=#f28500}}
Content
This article has content issues.
{{MessageBox|speedy|Speedy Deletion|This article has been marked for speedy deletion.|image=Ambox warning pn.svg.png|color=#B32424|background-color=#FEE7E6|}}
Speedy Deletion
This article has been marked for speedy deletion.