Template:Demo RecipeItemIcon: Difference between revisions
From Eco - English Wiki
| [unchecked revision] | [unchecked revision] |
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
<!-- Minify template HTML using something like: https://codebeautify.org/minify-html --> | <!-- Minify template HTML using something like: https://codebeautify.org/minify-html --> | ||
<!-- Edit externally and to get indents back use same editor, just click "beautify" in the middle instead of "minify" --> | <!-- Edit externally and to get indents back use same editor, just click "beautify" in the middle instead of "minify" --> | ||
<includeonly><div class="recipe-item-icon shadow {{#if: {{{count|}}} | has-count }}" style="font-size:{{{size|64}}}px"><div class="recipe-item-icon__img-container">[[File:{{{icon}}}|{{{size|64}}}px]]</div><span class="recipe-item-icon__count">{{{count|}}}</span></div></includeonly> | <includeonly><div class="recipe-item-icon shadow {{#if: {{{count|}}} | has-count }} {{#switch: {{{border|white}}} | yellow = border-yellow | #default = border-white}}" style="font-size:{{{size|64}}}px"><div class="recipe-item-icon__img-container">[[File:{{{icon}}}|{{{size|64}}}px]]</div><span class="recipe-item-icon__count">{{{count|}}}</span></div></includeonly> | ||
<noinclude> | <noinclude> | ||
| Line 72: | Line 72: | ||
"example": "10", | "example": "10", | ||
"type": "number" | "type": "number" | ||
}, | |||
"border": { | |||
"description": "Border color (white or yellow)", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"white", | |||
"yellow" | |||
], | |||
"default": "white" | |||
} | } | ||
} | } | ||
Revision as of 15:30, 19 February 2026
Visual Goals
Template Examples
| Color | Example |
|---|---|
| White (Default) |
|
| Yellow |
|
| Size | Example |
|---|---|
| 64px (Default) |
|
| 128px |
|
| 256px |
|
| Count | Example |
|---|---|
| No Count/Shadow |
|
| 10 |
|
| 100 |
|
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| size | size | Size in pixels (numbers only)
| Number | optional |
| icon | icon | File name for icon.
| String | required |
| count | count num | A number to display over this icon's image. Useful for showing counts.
| Number | optional |
| border | border | Border color (white or yellow)
| String | optional |