Template:Infobox Card: Difference between revisions

Jump to navigation Jump to search
Use the cardname as a variable since it is used multiple times.
mNo edit summary
(Use the cardname as a variable since it is used multiple times.)
Line 1: Line 1:
<includeonly>__NOTOC__<div style="float:right; border:2px solid {{Type Color|type={{ValidateArchetype|{{{archetype|}}}}}_border}}; margin:0 0 15px 15px; border-radius:15px; width:270px; background-color: {{Type Color|type={{ValidateArchetype|{{{archetype|}}}}}_background}}; box-shadow: 0px 2px 4px #7B8C96; padding:7px;">
<includeonly>__NOTOC__
{| class="wikitable" style="width:100%;border:0px transparent;background-color:transparent"
{{#if:{{{name|}}}|
{{#if:{{{name|}}}|
   ! colspan=2 style="border:0px transparent;font-size:150%;background-color:transparent" {{!}}<div style="margin:0 0 15px 0">{{{name|}}}</div>
   {{
    #vardefine: cardname | {{{name|}}}
  }}
|
|
   ! colspan=2 style="border:0px transparent;font-size:150%;background-color:transparent" {{!}}<div style="margin:0 0 15px 0">{{PAGENAME}}</div>
   {{
    #vardefine: cardname | {{PAGENAME}}
  }}
}}
}}
<div style="float:right; border:2px solid {{Type Color|type={{ValidateArchetype|{{{archetype|}}}}}_border}}; margin:0 0 15px 15px; border-radius:15px; width:270px; background-color: {{Type Color|type={{ValidateArchetype|{{{archetype|}}}}}_background}}; box-shadow: 0px 2px 4px #7B8C96; padding:7px;">
{| class="wikitable" style="width:100%;border:0px transparent;background-color:transparent"
! colspan=2 style="border:0px transparent;font-size:150%;background-color:transparent" |<div style="margin:0 0 15px 0">{{#var: cardname }}</div>
{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
   <div style="text-align:center;width:100%">[[File:{{{image|}}}|230px|{{{name|}}}]]</div>
   <div style="text-align:center;width:100%">[[File:{{{image|}}}|230px|{{#var: cardname }}]]</div>
|
|
   {{#ifexist: File:{{{name|}}}.png|
   {{#ifexist: File:{{#var: cardname }}.png|
     <div style="text-align:center;width:100%">[[File:{{{name|}}}.png|230px|{{{name|}}}]]</div>
     <div style="text-align:center;width:100%">[[File:{{#var: cardname }}.png|230px|{{#var: cardname }}]]</div>
   |
   |
     <div style="margin: 0 auto;width:230px;height:350px;background-color:rgb(255,255,255)">Missing image. Please set the <nowiki>|image=</nowiki> argument for this template<br><br><br>Alternatively upload the file [[File:{{{name|}}}.png]]</div>
     <div style="margin: 0 auto;width:230px;height:350px;background-color:rgb(255,255,255)">Missing image. Please set the <nowiki>|image=</nowiki> argument for this template<br><br><br>Alternatively upload the file [[File:{{#var: cardname }}.png]]</div>
   }}
   }}
}}
}}

Navigation menu