Template:Event infobox: Difference between revisions
From Tears of Themis Wiki
(Created page with "<noinclude>{{doc}}Category:Templates</noinclude><includeonly>{{#css: .promoimage img {max-width:100%; height: auto; } }} <div class="col-md-4 col-sm-12" style="float:right"> <div class="promoimage">[[File:{{#var:bannerOverride|{{{promoImage|}}} }}|link=]]</div> {| class="wikitable" style="width:100%" ! Start Date | {{#time:Y-m-d H:i|{{{startDate|}}} }} UTC +9 |- ! End Date | {{#time:Y-m-d H:i|{{{endDate|}}} }} UTC +9 |- ! Duration | Approx. {{#expr:ceil(({{#time:xNU...") |
No edit summary |
||
Line 5: | Line 5: | ||
<div class="promoimage">[[File:{{#var:bannerOverride|{{{promoImage|}}} }}|link=]]</div> | <div class="promoimage">[[File:{{#var:bannerOverride|{{{promoImage|}}} }}|link=]]</div> | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
! colspan=2 | {{{name|}}} | |||
|- | |||
! Start Date | ! Start Date | ||
| {{#time:Y-m-d H:i|{{{startDate|}}} }} UTC +9 | | {{#time:Y-m-d H:i|{{{startDate|}}} }} UTC +9 |
Revision as of 23:16, 19 February 2023
Description
Generates an infobox with event promo image, start date, end date, and duration in a standard format for all event pages.
Usage
{{Event infobox |name= |promoImage= |startDate=YYYY-MM-DD HH:MM:SS |endDate=YYYY-MM-DD HH:MM:SS }}
Example
{{Event infobox |name=Blizzardous Threads of Red |promoImage=Blizzardous Threads of Red.jpg |startDate=2023-01-12 11:00 |endDate=2023-02-02 04:00 }}
Blizzardous Threads of Red | |
---|---|
Start Date | 2023-01-12 11:00 UTC +9 |
End Date | 2023-02-02 04:00 UTC +9 |
Duration | Approx. 21 days |
Optional banner override
In case the template is called via cargo query and the editor would like to override with a different banner image than was used in the event announcement, this can be done by setting the variable "bannerOverride" before calling the template.
{{#vardefine:bannerOverride | Blizzardous Threads of Red banner.png }} {{Event infobox |name=Blizzardous Threads of Red |promoImage=Blizzardous Threads of Red.jpg |startDate=2023-01-12 11:00 |endDate=2023-02-02 04:00 }}
Blizzardous Threads of Red | |
---|---|
Start Date | 2023-01-12 11:00 UTC +9 |
End Date | 2023-02-02 04:00 UTC +9 |
Duration | Approx. 21 days |
The above documentation is transcluded from Template:Event infobox/doc. (edit | history)