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 {{#if: {{{count|}}} | has-count }} {{#switch: {{{border|}}} | yellow = border-yellow | white = border-white | #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> | <includeonly><div class="recipe-item-icon {{#if: {{{count|}}} | has-count }} {{#switch: {{{border|}}} | yellow = border-yellow | white = border-white | green = border-green | #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 74: | Line 74: | ||
}, | }, | ||
"border": { | "border": { | ||
"description": "Border color | "description": "Border color", | ||
"type": "string", | "type": "string", | ||
"suggestedvalues": [ | "suggestedvalues": [ | ||
"white", | "white", | ||
"yellow" | "yellow", | ||
"green" | |||
], | ], | ||
"default": "white" | "default": "white", | ||
"autovalue": "white" | |||
} | } | ||
} | } | ||
Revision as of 15:46, 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
| String | optional |