Template:ItemBox: Difference between revisions

Vergir (talk | contribs)
Change imbue/active tags from <p> to <div> so the mobile skin's paragraph font-size rule no longer matches them, letting the tags scale with the card and sit in their intended positions (with help from vergir-bot LLM)
Vergir (talk | contribs)
Add optional wearMask, iconMask and texture parameters so callers rendering many cards can drop per-card mask passes and the backdrop read (with help from vergir-bot LLM)
Line 20: Line 20:
-->{{#vardefine:isImbue|{{{overrideIsImbue|{{#invoke:ItemData|get_prop|{{#var:itemName}}|IsImbue}}}}}}}<!--
-->{{#vardefine:isImbue|{{{overrideIsImbue|{{#invoke:ItemData|get_prop|{{#var:itemName}}|IsImbue}}}}}}}<!--
-->{{#vardefine:isImbue|{{#ifeq:{{#var:isImbue}}|true|itembox-imbue}}}}<!--
-->{{#vardefine:isImbue|{{#ifeq:{{#var:isImbue}}|true|itembox-imbue}}}}<!--
    Optional simplifications for callers that render many cards at once. Each
    masked layer costs the GPU an extra render pass per card and the texture
    costs a backdrop read, so dropping them buys frames at the cost of detail.
    wearMask=no keeps the per-tier tint but loses the worn paper edge.
-->{{#vardefine:lite|{{#ifeq:{{{wearMask|}}}|no|itembox-flat-wear}} {{#ifeq:{{{iconMask|}}}|no|itembox-flat-icon}} {{#ifeq:{{{texture|}}}|no|itembox-no-texture}}}}<!--


     Links.
     Links.
Line 26: Line 32:
-->{{#vardefine:linkClick|{{{overrideLinkClick|{{#var:itemName}}{{If lang}}}}}}}<!--
-->{{#vardefine:linkClick|{{{overrideLinkClick|{{#var:itemName}}{{If lang}}}}}}}<!--


--><div class="itembox {{#var:showTierTag}} {{#var:tier}} {{#var:slot}} {{#var:isActive}} {{#var:isImbue}} {{#var:variants}}" style="font-size:{{#expr: 10 * {{#if:{{{size|}}}|{{{size}}}|1}} }}px;">
--><div class="itembox {{#var:showTierTag}} {{#var:tier}} {{#var:slot}} {{#var:isActive}} {{#var:isImbue}} {{#var:variants}} {{#var:lite}}" style="font-size:{{#expr: 10 * {{#if:{{{size|}}}|{{{size}}}|1}} }}px;">
<div class="itembox-background">
<div class="itembox-background">
<div class="itembox-card">
<div class="itembox-card">