Difference between revisions of "Template:Msgbox"

From WikiCorporates
Jump to navigation Jump to search
(Created page with "<table class="plainlinks cmbox cmbox-notice" role="presentation"> <tr> <td class="mbox-image">thumb|40x40px</td> <td class="mbox-text">...")
 
m
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
<table class="plainlinks cmbox cmbox-notice" role="presentation">
+
{{#switch:{{{type|}}}
 +
| protection =
 +
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#efefe1;">
 
<tr>
 
<tr>
−
<td class="mbox-image">[[File:40px-Information_icon4.svg.png|thumb|40x40px]]</td>
+
<td style="border:none; padding:2px 0 2px 0.9em; text-align:center;">[[File:Padlock-silver-medium.svg|40x40px]]</td>
−
<td class="mbox-text">type=<u>notice</u> – Notices and messages of any kind, both permanent and temporary.</td>
+
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
−
<noinclude>Category:WikiPolitiks templates</noinclude>
+
| content =
 +
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#ffe7ce;">
 +
<tr>
 +
<td style="border:none; padding:2px 0 2px 0.9em; text-align:center;">[[File:Ambox_important.svg|40x40px]]</td>
 +
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 +
</tr>
 +
</table>
 +
| style =
 +
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#fff9db;">
 +
<tr>
 +
<td style="border:none; padding:2px 0 2px 0.9em; text-align:center;">[[File:Edit-clear.svg|40x40px]]</td>
 +
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 +
</tr>
 +
</table>
 +
| #default =
 +
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#d8e8ff;">
 +
<tr>
 +
<td style="border:none; padding:2px 0 2px 0.9em; text-align:center;">[[File:Information icon4.svg|40x40px]]</td>
 +
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 +
</tr>
 +
</table>
 +
}}<noinclude>{{doc2}}</noinclude>

Latest revision as of 18:47, 16 April 2018

Information icon4.svg {{{text}}}

[edit] Documentation

Usage

I copied 3 of Wikipedia's message boxes from here, and the styles from here. Wikipedia uses these particular styles on Category pages, but I think they're cute enough to use on Article pages too. Wikipedia's messageboxes for Article pages are here.

To use:

{{Msgbox
| type = protection | content | style | notice (default)
| text = This is a '''Container category'''. Due to its scope, it should contain ''only'' subcategories.
}}

Example Message Usage

Padlock-silver-medium.svg Protection: This template is currently protected from editing.
Ambox important.svg Content: Major warnings eg. "PoV" and "Categorization of people disputed".
Edit-clear.svg Style: Minor warnings and problems such as "Underpopulated category".
Information icon4.svg Notice: Notices and messages of any kind, both permanent and temporary.
Wikipedia's styles for these messageboxes:
table class="plainlinks cmbox cmbox-notice"
  cmbox: margin:3px 10%; border-collapse:collapse; border: 1px solid #a2a9b1; background:#dfe8ff;
  cmbox-protection: background:#efefe1;
  cmbox-content:    background:#ffe7ce; 
  cmbox-style:      background:#fff9db;
  cmbox-notice:     background:#d8e8ff;
td class="mbox-image": border:none; padding:2px 0 2px 0.9em; text-align:center;
td class="mbox-text": border:none; padding:0.25em0.9em; width:100%;

Nb: got the idea about how to use "switch" in the template from here: Templates Wiki