Difference between revisions of "Template:Mbox"

From WikiPrizm
Jump to navigationJump to search
(Created page with '<table class="metadata plainlinks mbox {{{class|}}}" style="{{{style|}}}"> <tr> {{#switch:{{{image|}}} | none = <td class="mbox-empty-cell"></td> <!-- No image. Cell with some …')
 
Line 1: Line 1:
<table class="metadata plainlinks mbox {{{class|}}}" style="{{{style|}}}">
+
<noinclude>Include this template for little notices on pages.</noinclude>
<tr>
+
<div class="metadata plainlinks mbox {{{class|}}}" style="width:95%; background-color:#bbb; padding:.25em .5em; {{{style|}}}">
{{#switch:{{{image|}}}
+
{{{text}}}
| none = <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
+
</div>
| #default =
 
  <td class="mbox-image">{{
 
  #switch:{{{small|}}}
 
  | left = <!-- Don't use the DIV -->
 
  | #default = <div style="width: {{{imagewidth||52px}}};">
 
  }}
 
  {{#if: {{{image|}}}
 
  | {{{image}}}
 
  | [[File:{{#if: {{{filename|}}} | {{{filename}}} | {{#switch:{{{type|}}}
 
    | critical  = Ambox speedy deletion.png
 
    | important  = Ambox deletion.png
 
    | warning    = Ambox content.png
 
    | caution    = Edit-clear.svg
 
    | move      = Ambox move.png
 
    | protection = Ambox protection.png
 
    | license = Imbox license.png
 
    | notice          <!-- notice = default -->
 
    | #default  = Ambox notice.png
 
    }} }} | {{#switch:{{{small|}}}
 
      | left = 20x20px
 
      | #default = 40x40px
 
      }} |link=|alt=]]
 
  }}{{#switch:{{{small|}}}
 
  | left = <!-- Don't use the /DIV -->
 
  | #default = </div>
 
  }}</td>
 
}}
 
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
 
{{#if:{{{imageright|}}}
 
| {{#ifeq:{{{imageright|}}}|none
 
  | <!-- No image. -->
 
  | <td class="mbox-imageright">{{#switch:{{{small|}}}
 
    | left = {{{imageright}}}
 
    | #default = <div style="width: {{{imagerightwidth|52px}}};"> {{{imageright}}} </div>
 
    }}</td>
 
  }}
 
}}
 
</tr>
 
</table><noinclude>
 
{{documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 

Revision as of 15:48, 14 May 2012

Include this template for little notices on pages.