Template:Infobox: Difference between revisions

From BSC Policy
Jump to navigationJump to search
(Add generic parameterized info box.)
 
(remove h2 tags so TOCs aren't auto-inserted)
Line 2: Line 2:
<table class="plainlinks ombox" role="presentation">
<table class="plainlinks ombox" role="presentation">
<tr><td class="{{{type|message}}}box-image">[[File:{{{type|Information}}}_icon4.svg.png|40x40]]</td>
<tr><td class="{{{type|message}}}box-image">[[File:{{{type|Information}}}_icon4.svg.png|40x40]]</td>
<td class="{{{type|message}}}box-text"><h2>{{{heading}}}</h2><br \>
<td class="{{{type|message}}}box-text"><b>{{{heading}}}</b><br \>
{{{body}}}</td></tr></table></div>
{{{body}}}</td></tr></table></div>


<noinclude>
<noinclude>
__NOTOC__
This is the same as [https://en.wikipedia.org/wiki/Template:Message_box Wikipedia's Message box] except that we can't handle optional parameters, so all are required.
This is the same as [https://en.wikipedia.org/wiki/Template:Message_box Wikipedia's Message box] except that we can't handle optional parameters, so all are required.
==Usage==
==Usage==
Line 27: Line 26:
<div class="warningbox"><table class="plainlinks" role="presentation">
<div class="warningbox"><table class="plainlinks" role="presentation">
<tr><td class="warningbox-image">[[File:warning_icon4.svg.png|40x40]]</td>
<tr><td class="warningbox-image">[[File:warning_icon4.svg.png|40x40]]</td>
<td class="warningbox-text"><h2>Warning</h2><br \>
<td class="warningbox-text"><b>Warning</b><br \>
body text here</td></tr></table></div>
body text here</td></tr></table></div>


Line 33: Line 32:
<div class="errorbox"><table class="plainlinks" role="presentation">
<div class="errorbox"><table class="plainlinks" role="presentation">
<tr><td class="errorbox-image">[[File:error_icon4.svg.png|40x40]]</td>
<tr><td class="errorbox-image">[[File:error_icon4.svg.png|40x40]]</td>
<td class="errorbox-text"><h2>Error</h2><br \>
<td class="errorbox-text"><b>Error</b><br \>
body text here</td></tr></table></div>
body text here</td></tr></table></div>


Line 39: Line 38:
<div class="successbox"><table class="plainlinks" role="presentation">
<div class="successbox"><table class="plainlinks" role="presentation">
<tr><td class="successbox-image">[[File:success_icon4.svg.png|40x40]]</td>
<tr><td class="successbox-image">[[File:success_icon4.svg.png|40x40]]</td>
<td class="successbox-text"><h2>Success</h2><br \>
<td class="successbox-text"><b>Success</b><br \>
body text here</td></tr></table></div>
body text here</td></tr></table></div>
</noinclude>
</noinclude>

Revision as of 13:00, 16 April 2021


This is the same as Wikipedia's Message box except that we can't handle optional parameters, so all are required.

Usage

{{{Infobox
|type    = 
|heading = 
|body    = 
}}}

Where type is one of warning, message, success, error (since these correspond to css classes we already have).

Examples

{{{Infobox
|type    = warning
|heading = Warning
|body    = body text here
}}}

Warning

Error

Success