Difference between revisions of "Template:Gacha preview infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
Line 39: Line 39:
     padding: 0px 7px 0px 7px;
     padding: 0px 7px 0px 7px;
}
}
}}{{#vardefine:Gacha subobj|
}}{{#vardefine:gacha subobj|
  {{#ask:
  {{#ask:
   [[Has game context::Gacha]]
   [[Has game context::Gacha]]
Line 49: Line 49:
   |searchlabel=
   |searchlabel=
  }}
  }}
}}{{#if:{{#var:Gacha subobj}}|<table id="Gacha{{#Gachanumber}}" class="preview-infobox">
}}{{#if:{{#var:gacha subobj}}|<table id="gacha{{#gachanumber}}" class="preview-infobox">
<tr>
<tr>
   <th colspan="2">[[{{#var:Gacha subobj}}|{{{en name|{{{jp name|???}}}}}}]]</th>
   <th colspan="2">[[{{#var:gacha subobj}}|{{{en name|{{{jp name|???}}}}}}]]</th>
</tr>
</tr>
<tr>
<tr>
   <td colspan="2">{{#vardefine:banner image array|{{#show:{{#var:Gacha subobj}}|?Has banner image}}}}{{#vardefine:banner image loop|{{#ifeq:{{{banners|1}}}|0|999|{{{banners|1}}}}}}}{{#while:|{{#var:banner image loop}}|
   <td colspan="2">{{#vardefine:banner image array|{{#show:{{#var:gacha subobj}}|?Has banner image}}}}{{#vardefine:banner image loop|{{#ifeq:{{{banners|1}}}|0|999|{{{banners|1}}}}}}}{{#while:|{{#var:banner image loop}}|
<div class="banner-image">{{Direct Linked Image|src={{filepath:{{#sub:{{#var:banner image array}}|0|{{#pos:{{#var:banner image array}}|;}}}}}}|href={{#show:{{#var:Gacha subobj}}|?Has news link}}}}<!--<a href="{{#show:{{#var:Gacha subobj}}|?Has news link}}"><img class="banner-image" src="{{filepath:{{#sub:{{#var:banner image array}}|0|{{#pos:{{#var:banner image array}}|;}}}}}}"></img></a>--></div>
<div class="banner-image">{{Direct Linked Image|src={{filepath:{{#sub:{{#var:banner image array}}|0|{{#pos:{{#var:banner image array}}|;}}}}}}|href={{#show:{{#var:gacha subobj}}|?Has news link}}}}<!--<a href="{{#show:{{#var:gacha subobj}}|?Has news link}}"><img class="banner-image" src="{{filepath:{{#sub:{{#var:banner image array}}|0|{{#pos:{{#var:banner image array}}|;}}}}}}"></img></a>--></div>
{{#if:{{#pos:{{#var:banner image array}}|;}}|{{#vardefine:banner image loop|{{#expr:{{#var:banner image loop}}-1}}}}|{{#vardefine:banner image loop|}}}}
{{#if:{{#pos:{{#var:banner image array}}|;}}|{{#vardefine:banner image loop|{{#expr:{{#var:banner image loop}}-1}}}}|{{#vardefine:banner image loop|}}}}
{{#vardefine:banner image array|{{#sub:{{#var:banner image array}}|{{#expr:{{#pos:{{#var:banner image array}}|;}}+1}}}}}}
{{#vardefine:banner image array|{{#sub:{{#var:banner image array}}|{{#expr:{{#pos:{{#var:banner image array}}|;}}+1}}}}}}
Line 61: Line 61:
   </td>
   </td>
</tr>
</tr>
{{#vardefine:duration array|{{#show:{{#var:Gacha subobj}}|?Has duration date}}}}{{#if:{{#var:duration array|}}|
{{#vardefine:duration array|{{#show:{{#var:gacha subobj}}|?Has duration date}}}}{{#if:{{#var:duration array|}}|
<tr>
<tr>
   <th colspan="2">Durations</th>
   <th colspan="2">Durations</th>
Line 104: Line 104:
}}
}}
}}}}
}}}}
<tr>
  <th colspan="2">Units</th>
</tr>
<tr>
  <td colspan="2">{{#show:{{#var:gacha subobj}}|?Revolves around units}}</td>
</tr>
</table>
</table>
}}</includeonly><noinclude>
}}</includeonly><noinclude>

Revision as of 04:04, 15 July 2018

Description

This template displays a gacha's information through an infobox.

Usage

{{Gacha preview infobox
| en name = 
| jp name =
| banners = 
| floats =
}}

Parameters

en name
English name of gacha
jp name
Japanese name of gacha (optional if en name is provided; required if not).
banners
Number of banners to show; defaults to 1. Provide 0 to show all.
floats
Determines if it should float to the right; only "true" enables it.

Examples

{{Gacha preview infobox
| en name = Honorless Great Summer Festival Struggle
| banners = 2
}}
Honorless Great Summer Festival Struggle
Durations
Duration From July 05, 2018 at 18:00 until August 05, 2018 at 23:59
Units
hogen/5/Festival, nobuharu/4/Festival, suzuka/4/Standard, gyobu/4/Standard, tajikarao/5/Standard