Difference between revisions of "Template:Card table"
Dinoguy1000 (talk | contribs) (shorter var names; don't set any categories or properties unless it's the first transclusion; better image width handling (among other things, don't stretch images smaller than the max width unless their width is explicitly set)) |
Dinoguy1000 (talk | contribs) (got the name wrong on the var that indicates whether the current table is the first on a page, so just change the "correct" instance to the name I thought it was (since generally we use underscores for var names anyways)) |
||
Line 18: | Line 18: | ||
}}<!-- | }}<!-- | ||
− | --><div {{ #if: {{ #var: $ | + | --><div {{ #if: {{ #var: $first_card_table }} || id="main-card-table" }} class="card-table {{ #if: {{{bodyclass|}}} | {{{bodyclass}}} | blank-card }}" style="{{{bodystyle|}}}"> |
{{ #if: {{{title<includeonly>|</includeonly>}}} | | {{ #if: {{{title<includeonly>|</includeonly>}}} | | ||
<div class="heading {{{titleclass|}}}" style="{{{titlestyle|}}}"><div>{{{title}}}</div></div> | <div class="heading {{{titleclass|}}}" style="{{{titlestyle|}}}"><div>{{{title}}}</div></div> |
Revision as of 02:35, 1 July 2016
This template uses Lua: |
{{Card table}} is a metatemplate used to create card table templates.
Usage
Example
{{Card table | title = {{ #if: {{{title|}}} | {{{title}}} | {{PAGENAME}} }} | image = {{ #if: {{{image|}}} | {{{image}}} | Back-EN.png }} | label1 = [[Attribute]] | data1 = [[{{uc:{{{attribute}}}}}]] [[File:{{uc:{{{attribute}}}}}.svg|25px|alt=]] | label2 = [[Level]] | data2 = {{{level}}} {{Repeat|[[File:CG Star.svg|18px|alt=]]|{{{level}}}}} | label3 = [[Type|Type(s)]] | data3 = {{Card table/types|{{{types}}}|{{{effect_types|}}}|linked}} | label4 = [[ATK]]/[[DEF]] | data4 = {{{atk}}}/{{{def}}} | data5 = <div class="lore">{{{lore}}}</div> | label6 = Effect types | data6 = {{{effect types|}}} | label7 = Status | data7 = {{{status}}} }}