Template:Icon box: Difference between revisions
m (1 revision imported) |
Latest revision as of 13:50, 15 December 2024
Check out all pages using this template and feel free to discuss it in the gitlab issues.
This is a template for a box with an icon, largely inspired by Wikipedia's Template:Mbox. 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 }}
Note | Warning: Make sure to set your icon's size (like in the examples above). |
<templatedata>
{
"params": {
"role": {
"label": "HTML role",
"description": "HTML accessible role parameter to add to the box.",
"type": "string",
"autovalue": "text container"
},
"color": {
"label": "Text color",
"type": "string",
"description": "Text color in any format supported by CSS (hex, rgb(...), ...)",
"autovalue": "inherit"
},
"background": {
"label": "Background color",
"type": "string",
"description": "Background color in any format supported by CSS (hex, rgb(...), ...)",
"autovalue": "inherit"
},
"border-width": {
"label": "Border width",
"type": "string",
"description": "Border width with unit",
"example": "1px",
"autovalue": "1px"
},
"border-style": {
"label": "Border style",
"description": "CSS border-style value",
"example": "solid",
"type": "string",
"autovalue": "solid"
},
"border-color": {
"label": "Border color",
"description": "Text color in any format supported by CSS (hex, rgb(...), ...)",
"type": "string",
"autovalue": "#eaecf0"
},
"nomargin": {
"label": "Disable margin",
"description": "If set, removes the margin from the sides of the box.",
"type": "boolean",
"autovalue": "false",
"suggested": true
},
"box-icons": {
"label": "Box icons",
"description": "Standard wikitext containing the icons to place inside of the box, see example syntax.",
"type": "content",
"suggested": true
},
"padding": {
"label": "Padding",
"description": "Padding to add to the box, with the unit",
"type": "string",
"autovalue": "0.35em"
},
"box-text": {
"label": "Box text",
"description": "Text inside of the box.",
"type": "content",
"required": true
}
},
"description": "Floating box with an icon and background. Used for licensing templates, Template:Note and similar boxes.",
"format": "block",
"paramOrder": [
"box-text",
"box-icons",
"nomargin",
"color",
"background",
"border-color",
"border-style",
"border-width",
"padding",
"role"
]
}
</templatedata>