More actions
fix css style name |
HiddenDragon (talk | contribs) wrap by default, unless specifying nowrap. This matches Template:IconLink |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly | <includeonly>{{#lvardef: margin | {{#expr: 0.015 * {{{size|40}}} }} }}{{#lvardef: size | {{{size|40}}} }}<span class="bg3wiki-itemicon-wrapper {{#if:{{{nowrap|}}}|nowrap|wrap}}" style="{{#if:{{{no_padding|}}}||margin-left: {{#lvar:margin}}rem;}}">{{#if:{{{override_icon|}}} | ||
tables=item_icon | |{{ItemIcon Internal|{{{override_icon}}}|{{#lvar:size}}|{{{override_rarity}}}|{{{show_rarity|}}}|{{{name}}} }} | ||
|fields=TRIM(icon),CONCAT('', '{{#lvar:size}}'),LOWER(rarity),CONCAT('', '{{{show_rarity|}}}'),CONCAT('', "{{{name}}}") | |{{#cargo_query: | ||
|where=item_icon._pageName="{{{name}}}" | tables = item_icon | ||
|limit=1 | | fields = | ||
|order by=item_icon._pageName | TRIM(icon) = icon, | ||
|default={{ItemIcon Internal|{{{name}}} Unfaded Icon.png|{{#lvar:size}}|common| true|{{{name}}}|missing=true}} | CONCAT('', '{{#lvar:size}}') = size, | ||
|more results text= | LOWER(rarity) = rarity, | ||
|format=template | CONCAT('', '{{{show_rarity|}}}') = show_rarity, | ||
|template=ItemIcon Internal | CONCAT('', "{{{name}}}") = name | ||
| where = {{#if: {{{uid|}}} | item_icon.uid = "{{{uid}}}" | item_icon._pageName="{{{name}}}" }} | |||
| limit = 1 | |||
| order by = item_icon._pageName | |||
| default = {{ItemIcon Internal|{{{name}}} Unfaded Icon.png|{{#lvar:size}}|common| true|{{{name}}}|missing=true}} | |||
| more results text = | |||
| format = template | |||
| template = ItemIcon Internal | |||
}} | }} | ||
}}{{#if:{{{show_name|}}}|<span class="bg3wiki-itemicon-link" style="margin-left: 1ch">[[{{{name}}}{{#if:{{{alias|}}}|{{!}}{{{alias}}}}}]]</span>}}{{#if:{{{wrap|}}}|{{Main only|[[Category:Pages using deprecated parameters]]}}}}</span></includeonly><noinclude>{{/doc}} | |||
== Template Data Section == | == Template Data Section == | ||
Line 67: | Line 66: | ||
"description": "If non-empty, will allow the item icon to wrap.", | "description": "If non-empty, will allow the item icon to wrap.", | ||
"type": "boolean" | "type": "boolean" | ||
}, | |||
"uid": { | |||
"description": "If specified, will instead search by UID.", | |||
"type": "string" | |||
} | } | ||
}, | }, | ||
Line 72: | Line 75: | ||
"paramOrder": [ | "paramOrder": [ | ||
"name", | "name", | ||
"uid", | |||
"size", | "size", | ||
"show_name", | "show_name", |