Jump to content

Template:Ambox/core: Difference between revisions

From IdeaWazaWiki
wikademia>Happy-melon
hardcoded small styles
wikademia>Eme
m 1 revision
 
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<table class="metadata plainlinks ambox {{#switch:{{{small|}}}|left=mbox-small-left}}
<table class="metadata plainlinks ambox {{#switch:{{{small|}}}
{{#switch:{{{type|}}}
| left = mbox-small-left
}} {{#switch:{{{type|}}}
| speedy    = ambox-speedy
| speedy    = ambox-speedy
| delete    = ambox-delete
| delete    = ambox-delete
Line 9: Line 10:
| notice    <!-- notice = default -->
| notice    <!-- notice = default -->
| #default  = ambox-notice
| #default  = ambox-notice
}}" style="<!--
}}" style="{{{style|}}}">
 
 
-->{{#switch:{{{small|}}}|left=margin:4px 1em 4px 0; width:238px; border-collapse:collapse; font-size: 88%; line-height:1.25em;}}<!--
 
 
-->{{{style|}}}">
<tr>
<tr>
{{#ifeq:{{{image|}}}|none
{{#switch:{{{image|}}}
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->{{td}}
| blank    <!-- Fall back to "none", since deprecated. -->
| <td class="mbox-image"><div style="width: 52px;">
| none = <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
  {{#ifeq:{{{image|}}}|blank
| #default =
    | &nbsp;
  <td class="mbox-image">{{
    | {{#if:{{{image|}}}
  #switch:{{{small|}}}
      | {{{image}}}
  | left = <!-- Don't use the DIV -->
      | {{#switch:{{{type|}}}
  | #default = <div style="width: 52px;">
          | speedy    = [[Image:Ambox speedy deletion.png|40x40px]]
  }}
          | delete    = [[Image:Ambox deletion.png|40x40px]]
  {{#if:{{{image|}}}
          | content    = [[Image:Ambox content.png|40x40px]]
  | {{{image}}}
          | style      = [[Image:Ambox style.png|40x40px]]
  | [[File:{{#switch:{{{type|}}}
          | move      = [[Image:Ambox move.png|40x40px]]
    | speedy    = Ambox speedy deletion.png
          | protection = [[Image:Ambox protection.png|40x40px]]
    | delete    = Ambox deletion.png
          | notice     <!-- notice = default -->
    | content    = Ambox content.png
          | #default  = [[Image:Ambox notice.png|40x40px]]
    | style      = Edit-clear.svg
        }}
    | move      = Ambox move.png
      }}
    | protection = Ambox protection.png
  }}</div></td>
    | 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>
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
Line 41: Line 45:
| {{#ifeq:{{{imageright|}}}|none
| {{#ifeq:{{{imageright|}}}|none
   | <!-- No image. -->
   | <!-- No image. -->
   | <td class="mbox-imageright"> {{{imageright}}} </td>
   | <td class="mbox-imageright">{{#switch:{{{small|}}}
    | left = {{{imageright}}}
    | #default = <div style="width: 52px;"> {{{imageright}}} </div>
    }}</td>
   }}
   }}
}}
}}
</tr>
</tr>
</table><!-- Detect and report usage with faulty "type" parameter:
</table><!--  
Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
-->{{#switch:{{{type|}}}
|  <!-- No type fed, is also valid input -->
|  <!-- No type fed, is also valid input -->
Line 56: Line 64:
| notice    = <!-- Do nothing, valid "type" -->
| notice    = <!-- Do nothing, valid "type" -->
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<!--
Detect and report usage of deprecated "image=blank":
-->{{#switch:{{{image|}}}
| blank = [[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
}}<noinclude>
 
{{documentation}}
{{pp-template|small=yes}}
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Latest revision as of 21:29, 18 December 2010

[create] Template documentation