Difference between revisions of "Template:Ambox/core"
From Self-sufficiency
(image sizing) |
(Adding back the proper styles for the empty <td> (the {{td}} is not equivalent). Adding back the 52px DIV for the right image. And some changes in comments and code indentation.) |
||
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="{{#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 | {{#ifeq:{{{image|}}}|none | ||
− | + | | <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 0px; width: 1px;"></td> | |
− | + | | <td class="mbox-image">{{#switch:{{{small|}}} | |
− | + | | left = <!-- Don't use the DIV --> | |
+ | | #default = <div style="width: 52px;"> | ||
+ | }} | ||
+ | {{#if:{{{image|}}} | ||
| {{{image}}} | | {{{image}}} | ||
| [[Image:{{#switch:{{{type|}}} | | [[Image:{{#switch:{{{type|}}} | ||
Line 31: | Line 31: | ||
| notice <!-- notice = default --> | | notice <!-- notice = default --> | ||
| #default = Ambox notice.png | | #default = Ambox notice.png | ||
− | }} | {{#switch: {{{small|}}} | left=20x20px | 40x40px }} ]] | + | }} | {{#switch:{{{small|}}} |
− | }}{{#switch: {{{small|}}} | left=<!-- | + | | left = 20x20px |
+ | | #default = 40x40px | ||
+ | }} ]] | ||
+ | }}{{#switch:{{{small|}}} | ||
+ | | left = <!-- Don't use the /DIV --> | ||
+ | | </div> | ||
+ | }}</td> | ||
}} | }} | ||
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td> | <td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td> | ||
Line 38: | Line 44: | ||
| {{#ifeq:{{{imageright|}}}|none | | {{#ifeq:{{{imageright|}}}|none | ||
| <!-- No image. --> | | <!-- No image. --> | ||
− | | <td class="mbox-imageright"> {{{imageright}}} </td> | + | | <td class="mbox-imageright">{{#switch:{{{small|}}} |
+ | | left = <!-- Don't use the DIV --> | ||
+ | | #default = <div style="width: 52px;"> | ||
+ | }} {{{imageright}}} {{#switch:{{{small|}}} | ||
+ | | left = <!-- Don't use the /DIV --> | ||
+ | | </div> | ||
+ | }}</td> | ||
}} | }} | ||
}} | }} |
Revision as of 05:00, 11 March 2009
{{{text}}} |
[edit]
Documentation