Template:Icon box: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This is a template for a box with an icon, largely inspired by Wikipedia's Template:Mbox. | |||
This is a template for a box with an icon, largely inspired by Wikipedia's | |||
{{Icon box | {{Icon box | ||
| Line 39: | Line 38: | ||
| border-width = 1px | | border-width = 1px | ||
| background = #f6efe5 | | background = #f6efe5 | ||
}} | }} | ||
| Line 62: | Line 60: | ||
{{#if: {{{border-color|}}}|--ib-border-color: {{{border-color|unset}}};|}} | {{#if: {{{border-color|}}}|--ib-border-color: {{{border-color|unset}}};|}} | ||
{{#if: {{{border-color-dark|{{{border-color|}}}}}}|--ib-border-color-dark: {{{border-color-dark|{{{border-color|unset}}}}}};|}} | {{#if: {{{border-color-dark|{{{border-color|}}}}}}|--ib-border-color-dark: {{{border-color-dark|{{{border-color|unset}}}}}};|}} | ||
border-width: {{{border-width|1px}}}; border-style: {{{border-style|solid}}}; margin: 4px {{#if: {{{ | border-width: {{{border-width|1px}}}; border-style: {{{border-style|solid}}}; margin: 4px {{#if: {{{margin|}}}|10%|0}}; border-collapse: collapse;"><tr> | ||
{{#if: {{{box-icons|}}}|<td style="padding: 2px 0 2px 0.9em; text-align: center; line-height: 1;"><span style="white-space: nowrap;">{{{box-icons}}}</span></td>|}} | {{#if: {{{box-icons|}}}|<td style="padding: 2px 0 2px 0.9em; text-align: center; line-height: 1;"><span style="white-space: nowrap;">{{{box-icons}}}</span></td>|}} | ||
<td style="padding: {{{padding|0.35em}}} 0.9em; width: 100%;">{{{box-text}}}</td> | <td style="padding: {{{padding|0.35em}}} 0.9em; width: 100%;">{{{box-text}}}</td> | ||
| Line 107: | Line 105: | ||
"autovalue": "#eaecf0" | "autovalue": "#eaecf0" | ||
}, | }, | ||
" | "margin": { | ||
"label": " | "label": "Enable margin", | ||
"description": "If set, | "description": "If set, adds a margin from the sides of the box.", | ||
"type": "boolean", | "type": "boolean", | ||
"autovalue": "false" | "autovalue": "false" | ||
}, | }, | ||
"box-icons": { | "box-icons": { | ||
| Line 158: | Line 155: | ||
"box-text", | "box-text", | ||
"box-icons", | "box-icons", | ||
" | "margin", | ||
"color", | "color", | ||
"color-dark", | "color-dark", | ||