More actions
m Swee moved page Template:Icon Box to Template:Icon box |
mNo edit summary |
||
Line 55: | Line 55: | ||
{{note|'''Warning:''' Make sure to set your icon's size (like in the examples above).}} | {{note|'''Warning:''' Make sure to set your icon's size (like in the examples above).}} | ||
</noinclude><includeonly><table role="{{{role|text container}}}" {{#if: {{{class|}}}|class="{{{class}}}" }}style="color: {{{color|inherit}}}; background-color: {{{background|inherit}}}; border: {{{border-width|1px}}} {{{border-style|solid}}} {{{border-color|#eaecf0}}}; margin: 4px {{#if: {{{nomargin|}}}|0|10%}}; border-collapse: collapse;"><tr> | </noinclude><includeonly><table role="{{{role|text container}}}" {{#if: {{{class|}}}|class="{{{class}}}" }}style="color: {{{color|inherit}}}; background-color: {{{background|inherit}}}; border-radius: 5px; border: {{{border-width|1px}}} {{{border-style|solid}}} {{{border-color|#eaecf0}}}; margin: 4px {{#if: {{{nomargin|}}}|0|10%}}; border-collapse: collapse;"><tr> | ||
<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: 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> |
Latest revision as of 19:58, 3 May 2025
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 }}
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 |
Disable margin | nomargin | If set, removes the margin from the sides of the box.
| Boolean | suggested |
Text color | color | 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 |
Border color | border-color | Text 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 |