Difference between revisions of "Template:Msgbox"

From WikiCorporates
Jump to navigation Jump to search
m
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
<!--
 
−
See https://en.wikipedia.org/wiki/Template:Cmbox
 
−
and https://en.wikipedia.org/wiki/MediaWiki:Common.css
 
−
  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%;
 
−
-->
 
 
{{#switch:{{{type|}}}
 
{{#switch:{{{type|}}}
 
| protection =  
 
| protection =  
Line 16: Line 4:
 
<tr>
 
<tr>
 
<td style="border:none; padding:2px 0 2px 0.9em; text-align:center;">[[File:Padlock-silver-medium.svg|40x40px]]</td>
 
<td style="border:none; padding:2px 0 2px 0.9em; text-align:center;">[[File:Padlock-silver-medium.svg|40x40px]]</td>
−
<td style="border:none; padding:0.25em 0.9em; width:100%;">Protection template: {{{text}}}</td>
+
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
−
| content =  
+
| content =
 
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#ffe7ce;">
 
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#ffe7ce;">
 
<tr>
 
<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: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%;">Major warnings and problems: {{{text}}}</td>
+
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
−
| style =  
+
| style =
 
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#fff9db;">
 
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#fff9db;">
 
<tr>
 
<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: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%;">Minor warnings, eg. "Underpopulated category": {{{text}}}</td>
+
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
−
| #default = <!-- notice -->
+
| #default =
 
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#d8e8ff;">
 
<table role="presentation" style="margin:3px 10%; border-collapse:collapse; border:1px solid #a2a9b1; background:#d8e8ff;">
 
<tr>
 
<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: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>
+
<td style="border:none; padding:0.25em 0.9em; width:100%;">{{{text}}}</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
−
}}
+
}}<noinclude>{{doc2}}</noinclude>
−
<noinclude>Category:WikiPolitiks templates</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