Template:Icon box: Difference between revisions

Knuxify (talk | contribs)
No edit summary
Knuxify (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{Template}}
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 {{wikipedia|Template:Mbox}}. It's mainly used for license boxes.


{{Icon box
{{Icon box
Line 39: Line 38:
| border-width = 1px
| border-width = 1px
| background = #f6efe5
| background = #f6efe5
| nomargin = yes
}}
}}


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: {{{nomargin|}}}|0|10%}}; border-collapse: collapse;"><tr>
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"
},
},
"nomargin": {
"margin": {
"label": "Disable margin",
"label": "Enable margin",
"description": "If set, removes the margin from the sides of the box.",
"description": "If set, adds a margin from the sides of the box.",
"type": "boolean",
"type": "boolean",
"autovalue": "false",
"autovalue": "false"
"suggested": true
},
},
"box-icons": {
"box-icons": {
Line 158: Line 155:
"box-text",
"box-text",
"box-icons",
"box-icons",
"nomargin",
"margin",
"color",
"color",
"color-dark",
"color-dark",