Template:Icon: Difference between revisions
From Mechabellum Wiki
m (clean up, use comments to suppress P tags) |
(remove image preview) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div class="icon icon-{{{type}}}"><!-- | <div class="icon icon-{{{type|}}} {{#ifeq:{{{border|no}}}|no||icon-border}}"><!-- | ||
-->[[Image:{{{file|Redeployment.png}}}|frameless|{{#switch: {{{size|lg}}} | xs = 24px | sm = 32px | md = 48px | lg = 64px | xl = 96px }}]]<!-- | -->[[Image:{{{file|Redeployment.png}}}|frameless|link=|{{#switch: {{{size|lg}}} | xs = 24px | sm = 32px | md = 48px | lg = 64px | xl = 96px }}]]<!-- | ||
-->{{#if:{{{cost|}}}|<span class="cost">{{{cost}}}</span>}} | -->{{#if:{{{cost|}}}|<span class="cost">{{{cost}}}</span>}}<!-- | ||
</div> | --></div><noinclude> | ||
<noinclude> | |||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 43: | Line 42: | ||
"default": "64px", | "default": "64px", | ||
"autovalue": "lg" | "autovalue": "lg" | ||
}, | |||
"border": { | |||
"label": "Border", | |||
"description": "Enable border. Empty or \"no\" is no border all other values show a border.", | |||
"type": "boolean", | |||
"default": "no", | |||
"autovalue": "no" | |||
} | } | ||
}, | }, | ||
"description": "Wrapper for icons. Display cost and colorize depending on type.", | "description": "Wrapper for icons. Display cost and colorize depending on type.", | ||
"format": "inline" | "format": "inline", | ||
"paramOrder": [ | |||
"file", | |||
"type", | |||
"cost", | |||
"border", | |||
"size" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Latest revision as of 08:54, 2 June 2023
Wrapper for icons. Display cost and colorize depending on type.
Parameter | Description | Type | Status | |
---|---|---|---|---|
File Name | file | no description | File | required |
Type | type | Type of the icon. Allows type specific styling.
| String | required |
Cost | cost | Hidden when not set | Number | suggested |
Border | border | Enable border. Empty or "no" is no border all other values show a border.
| Boolean | optional |
Size | size | Image size (xs = 24px, sm = 32px, md = 48px, lg = 64px, xl = 96px) Default lg=64px
| String | optional |