Difference between revisions of "Template:Event preview infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
Line 56: Line 56:
<tr>
<tr>
   <td colspan="2">{{#vardefine:banner image array|{{#show:{{#var:event 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:event subobj}}|?Has banner image}}}}{{#vardefine:banner image loop|{{#ifeq:{{{banners|1}}}|0|999|{{{banners|1}}}}}}}{{#while:|{{#var:banner image loop}}|
<div class="banner-image">[[File:{{#sub:{{#var:banner image array}}|0|{{#pos:{{#var:banner image array}}|;}}}}|link={{#show:{{#var:event subobj}}|?Has news link}}]]</div>
<div class="banner-image">[[File:{{#sub:{{#var:banner image array}}|0|{{#pos:{{#var:banner image array}}|;}}}}|400px|link={{#show:{{#var:event subobj}}|?Has news link}}]]</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}}}}}}

Revision as of 21:38, 14 July 2018

Description

This template displays.

Usage

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

Parameters

en name
English name of event
jp name
Japanese name of event (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

{{Event preview infobox
| en name = Honorless Great Summer Festival Struggle
| banners = 2
}}
Honorless Great Summer Festival Struggle
Durations
Gacha From July 05, 2018 at 09:00 until August 06, 2018 at 14:59
Event Main Quest From July 08, 2018 at 15:00 until August 06, 2018 at 14:59
Event Free Quest From July 08, 2018 at 15:00 until July 30, 2018 at 14:59
Bonus Quests From August 01, 2018 at 15:00 until August 06, 2018 at 14:59