Difference between revisions of "Template:Event preview infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
Line 100: Line 100:
{{#vardefine:duration array tag|{{#ifexpr:{{#time: U|now}} >= {{#time:U|{{#var:duration array piece start}}}} and {{#time: U|now}} <= {{#time: U|{{#var:duration array piece end}}}}|b|s}}}}
{{#vardefine:duration array tag|{{#ifexpr:{{#time: U|now}} >= {{#time:U|{{#var:duration array piece start}}}} and {{#time: U|now}} <= {{#time: U|{{#var:duration array piece end}}}}|b|s}}}}
<td><{{#var:duration array tag}}>{{#explode:{{#var:duration array piece}}|!|0}}</{{#var:duration array tag}}>
<td><{{#var:duration array tag}}>{{#explode:{{#var:duration array piece}}|!|0}}</{{#var:duration array tag}}>
</td>{{#vardefine:duration format|F d\, Y "at" H\:i}}
</td>{{#vardefine:duration format|F d\, Y H\:i}}
{{#vardefine:duration array piece start|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece start}}|@|}}|+09:00|+00:00}}}}
{{#vardefine:duration array piece start|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece start}}|@|}}|+09:00|+00:00}}}}
   }}{{#vardefine:duration array piece end|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece end}}|@|}}|+09:00|+00:00}}}}
   }}{{#vardefine:duration array piece end|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece end}}|@|}}|+09:00|+00:00}}}}

Revision as of 16:29, 15 September 2020

Description

This template displays an event's information through an infobox.

Usage

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

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.
use jp
For the title: uses the JP name if en name is provided if true; uses the EN name if jp name is provided if false.

Examples

{{Event preview infobox
| en name = Advance! Onsen Jamboree
| banners = 2
}}