Difference between revisions of "Template:Transient extended infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(Put the equippable ar template in)
(Trying to add more lazy loading(?))
Line 827: Line 827:
   <tr>
   <tr>
     {{#if:{{#var:transient cdn icon|}}||{{#vardefine:transient cdn icon|{{{cdn icon|}}}}}}}
     {{#if:{{#var:transient cdn icon|}}||{{#vardefine:transient cdn icon|{{{cdn icon|}}}}}}}
     <td class="icon transient{{#var:transientnumber}}">{{#if:{{#var:transient no cdn|}}|[[File:{{{icon}}}.png|60px]]|{{#if:{{#var:transient cdn icon|}}|{{#tag:mediator|{{#var:transient cdn icon|}}|width=60|height=60}}|{{#ifexist:File:{{{icon|}}}.png|[[File:{{{icon}}}.png|60px]]|{{#ifexist:File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_icon.png|[[File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_icon.png|60px]]|{{#ifexist:File:{{{en name}}}_{{{rarity}}}star_icon.png|[[File:{{{en name}}}_{{{rarity}}}star_icon.png|60px]]|[[File:Unknown icon.png|60px]]}}}}}}}}}}</td>{{#vardefine:transient cdn icon|}}
     <td class="icon transient{{#var:transientnumber}}">{{#if:{{#var:transient no cdn|}}|[[File:{{{icon}}}.png|60px]]|{{#if:{{#var:transient cdn icon|}}|{{#tag:mediator|{{#var:transient cdn icon|}}|width=60|height=60|loading=lazy}}|{{#ifexist:File:{{{icon|}}}.png|[[File:{{{icon}}}.png|60px]]|{{#ifexist:File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_icon.png|[[File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_icon.png|60px]]|{{#ifexist:File:{{{en name}}}_{{{rarity}}}star_icon.png|[[File:{{{en name}}}_{{{rarity}}}star_icon.png|60px]]|[[File:Unknown icon.png|60px]]}}}}}}}}}}</td>{{#vardefine:transient cdn icon|}}
     <td class="weapon-attribute">{{#tag:mediator|https://cdn.housamo.xyz/housamo/builtin/icon_element_{{#var:energy filename|none}}.png|width=60|height=60}}{{#tag:mediator|https://cdn.housamo.xyz/housamo/unity/Android/icon/icon_weapon_{{#var:weapon type filename|nothing}}.png|width=60|height=60}}</td><td class="caption">
     <td class="weapon-attribute">{{#tag:mediator|https://cdn.housamo.xyz/housamo/builtin/icon_element_{{#var:energy filename|none}}.png|width=60|height=60|loading=lazy}}{{#tag:mediator|https://cdn.housamo.xyz/housamo/unity/Android/icon/icon_weapon_{{#var:weapon type filename|nothing}}.png|width=60|height=60|loading=lazy}}</td><td class="caption">
     <div class="name">[{{#if:{{{en title|}}}|{{#if:{{{jp-en title|}}}|<u><span title="{{{jp-en title|}}}">{{{en title}}}</span></u>|{{{en title}}}}}|?}}]&nbsp; {{#if:{{{id|}}}|[https://app.housamo.xyz/cards/{{{id}}}/ {{{en name|?}}}]|{{{en name|?}}}}}<!--{{#ifeq:{{{surname|―}}}|―||{{{surname}}}}}--></div>
     <div class="name">[{{#if:{{{en title|}}}|{{#if:{{{jp-en title|}}}|<u><span title="{{{jp-en title|}}}">{{{en title}}}</span></u>|{{{en title}}}}}|?}}]&nbsp; {{#if:{{{id|}}}|[https://app.housamo.xyz/cards/{{{id}}}/ {{{en name|?}}}]|{{{en name|?}}}}}<!--{{#ifeq:{{{surname|―}}}|―||{{{surname}}}}}--></div>
     <div class="sub">&#x3010;{{#if:{{{jp title|}}}|{{{jp title}}}|&#xFF1F;}}&#x3011;{{#if:{{{jp name|}}}|{{#ifeq:{{{surname|―}}}|―||{{{surname}}}}}{{{jp name}}}|{{#ifeq: {{#var:availability}} | Unobtainable | |&#xFF1F;}}}}</div>
     <div class="sub">&#x3010;{{#if:{{{jp title|}}}|{{{jp title}}}|&#xFF1F;}}&#x3011;{{#if:{{{jp name|}}}|{{#ifeq:{{{surname|―}}}|―||{{{surname}}}}}{{{jp name}}}|{{#ifeq: {{#var:availability}} | Unobtainable | |&#xFF1F;}}}}</div>
Line 842: Line 842:
   <tr>
   <tr>
   {{#if:{{#var:transient cdn artwork|}}||{{#vardefine:transient cdn artwork|{{{cdn artwork|}}}}}}}
   {{#if:{{#var:transient cdn artwork|}}||{{#vardefine:transient cdn artwork|{{{cdn artwork|}}}}}}}
   <td><div class="transient{{#var:transientnumber}} {{#ifeq:{{#var:energy}}|?|none|{{lc:{{Energy|{{#var:energy}}}}}}}}"><div class="header"></div><div class="artwork">{{#if:{{#var:transient no cdn|}}|[[File:{{{artwork}}}.png]]|{{#if:{{#var:transient cdn artwork|}}|{{#tag:mediator|{{#var:transient cdn artwork|}}}}|{{#ifexist:File:{{{artwork|}}}.png|[[File:{{{artwork}}}.png]]|{{#ifexist:File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_full.png|[[File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_full.png]]|No artwork uploaded.}}|}}|}}}}</div><div class="body></div></div>{{#vardefine:transient cdn artwork|}}
   <td><div class="transient{{#var:transientnumber}} {{#ifeq:{{#var:energy}}|?|none|{{lc:{{Energy|{{#var:energy}}}}}}}}"><div class="header"></div><div class="artwork">{{#if:{{#var:transient no cdn|}}|[[File:{{{artwork}}}.png]]|{{#if:{{#var:transient cdn artwork|}}|{{#tag:mediator|{{#var:transient cdn artwork|}}|loading=lazy}}|{{#ifexist:File:{{{artwork|}}}.png|[[File:{{{artwork}}}.png]]|{{#ifexist:File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_full.png|[[File:{{{en name}}}{{#if:{{{variant|}}}|_{{{variant}}}|}}_{{{rarity}}}star_full.png]]|No artwork uploaded.}}|}}|}}}}</div><div class="body></div></div>{{#vardefine:transient cdn artwork|}}
   </td>
   </td>
   {{#ifeq: {{{acquisition|}}}|Skin||
   {{#ifeq: {{{acquisition|}}}|Skin||

Revision as of 06:08, 25 July 2020

Description

This templates creates an infobox and subobject for a Transient. Please do not directly invoke this template.

An example to feed override parameters (such as translation names) are:

{{#vardefine:transient en name|Name}}
{{#vardefine:transient en title|Title}}
{{#vardefine:transient availability|Available}}
{{#vardefine:transient acquisition|Gacha}}
{{#vardefine:transient en jingi|Charge Skill Name}}
{{#vardefine:transient species|Species}}
{{#vardefine:transient gate|Gate Name}}
{{#vardefine:transient jp en research file|Translation for Japanese Research File}}

{{#vardefine:transient height|166}}
{{#vardefine:transient weight|96}}
{{#vardefine:transient summon date|8/7}}

To invoke this template properly, use (after the vardefines):

{{#masterdata:Card|CARDID}}

Consult other transient pages for additional undocumented options.