Template:Demo RecipeItemIcon: Difference between revisions

From Eco - English Wiki
[unchecked revision][unchecked revision]
WugWugg (talk | contribs)
No edit summary
WugWugg (talk | contribs)
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

location=center location=center location=center location=center

Template Examples

Border Colors
Color Example
White (Default)


Yellow


Responsive Sizing
Size Example
64px (Default)
10


128px
10


256px
10


Count Shadow
Count Example
No Count/Shadow


10
10


100
100


No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
sizesize

Size in pixels (numbers only)

Suggested values
64 128
Default
64
Example
64
Auto value
64
Numberoptional
iconicon

File name for icon.

Example
DaisyItem_Icon.png
Stringrequired
countcount num

A number to display over this icon's image. Useful for showing counts.

Example
10
Numberoptional
borderborder

Border color (white or yellow)

Suggested values
white yellow
Default
white
Stringoptional