Template:Icon box: Difference between revisions
No edit summary |
No edit summary |
||
| Line 39: | Line 39: | ||
| border-width = 1px | | border-width = 1px | ||
| background = #f6efe5 | | background = #f6efe5 | ||
}} | }} | ||
| Line 62: | Line 61: | ||
{{#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 106: | ||
"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 156: | ||
"box-text", | "box-text", | ||
"box-icons", | "box-icons", | ||
" | "margin", | ||
"color", | "color", | ||
"color-dark", | "color-dark", | ||
Revision as of 19:10, 6 June 2026
Template:Template This is a template for a box with an icon, largely inspired by Wikipedia's Template:Wikipedia. It's mainly used for license boxes.
| Icon | This is an example of the icon box. I can also use HTML tags and MediaWiki syntax, like links. |
{{Icon box
| box-icons = [[File:Icon-numix-light-start-here.svg|28px|link=|Icon]]
| box-text = This is an example of the icon box.<br>I can also use HTML tags and [[Templates|MediaWiki syntax, like links]].
}}
| Icon | This is an example license box. |
{{Icon box
| box-icons = [[File:Icon-numix-light-start-here.svg|28px|link=|Icon]]
| box-text = This is an example license box.
| border-color = #88a
| border-width = 3px
| background = #f7f8ff
}}
| Note | This is a box with no side margins. |
{{Icon box
| box-icons = [[File:Icon-numix-light-start-here.svg|20px|link=|Note]]
| box-text = This is a box with no side margins.
| border-color = #ac6600
| border-width = 1px
| background = #f6efe5
| nomargin = yes
}}
| Warning: Make sure to set your icon's size (like in the examples above). |
Floating box with an icon and background. Used for licensing templates, Template:Note and similar boxes.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Box text | box-text | Text inside of the box. | Content | required |
| Box icons | box-icons | Standard wikitext containing the icons to place inside of the box, see example syntax. | Content | suggested |
| Enable margin | margin | If set, adds a margin from the sides of the box.
| Boolean | optional |
| Text color | color | Text color in any format supported by CSS (hex, rgb(...), ...)
| String | optional |
| Text color (dark mode) | color-dark | Dark mode text color in any format supported by CSS (hex, rgb(...), ...) | String | optional |
| Background color | background | Background color in any format supported by CSS (hex, rgb(...), ...)
| String | optional |
| Background color (dark mode) | background-dark | Dark mode background color in any format supported by CSS (hex, rgb(...), ...) | String | optional |
| Border color | border-color | Border color in any format supported by CSS (hex, rgb(...), ...)
| String | optional |
| Border color (dark mode) | border-color-dark | Dark mode border color in any format supported by CSS (hex, rgb(...), ...) | String | optional |
| Border style | border-style | CSS border-style value
| String | optional |
| Border width | border-width | Border width with unit
| String | optional |
| Padding | padding | Padding to add to the box, with the unit
| String | optional |
| HTML role | role | HTML accessible role parameter to add to the box.
| String | optional |
| HTML class | class | HTML class/classes to add to the box. | String | optional |