Difference between revisions of "Template:Event"

From QWiki
m (Ignore me styling live)
m (Extending event rows to include an icon)
Line 1: Line 1:
<includeonly>
+
<includeonly><!--
 +
 
 +
If icon is set - use an image link to display it.
 +
-->{{#if:{{{icon|}}}|<span style="white-space:nowrap;">{{icon/{{lc:{{{icon}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{icon/tbd}}&nbsp;</span>}}<!--
 +
 
 
|style="padding:0.4em 0 0 0.6em;vertical-align: text-top;background-color:#fff;"|{{#if:{{{link|}}}|
 
|style="padding:0.4em 0 0 0.6em;vertical-align: text-top;background-color:#fff;"|{{#if:{{{link|}}}|
 
{{#switch: {{{link}}}
 
{{#switch: {{{link}}}

Revision as of 07:37, 1 February 2021

Documentation (view - edit)

This template is used by bracket templates as it needs wrapping code to actually work. It creates the overlay with information about maps, VODs, etc. that appears on click.

Example

The code:

{{Upcoming}}
{{Event|QHLAN 2021|date=?|link=false|i=qh}}
{{Event|sdCup #2|date=?|link=false|i=sdc}}
{{Ongoing}}
{{Event|GetQuad! Draft 4|date=22 Nov – ?|link=|i=gq}}
{{Event|Hammer Time Season 3|date=3 Jan – ?|link=|i=ht}}
{{Completed}}
{{Event|Nations Cup|date=16 sep – 21 dec|link=GetQuad! Nations Cup|i=nc}}
{{Event|sdCup #1|date=23 – 24 Jan|link=Sdcup1|i=sdc}}
{{Endcal}}

gives us:

-webkit-baseline-middle -webkit-baseline-middle 
Upcoming
-webkit-baseline-middle -webkit-baseline-middle 
Ongoing
-webkit-baseline-middle -webkit-baseline-middle 
Completed

Use

  • First variable is always the event name.
  • |date= date and short month.
    • Format: "29 Nov – 6 dec"
    • Use long/em dash () as separator instead of common dash.
    • If end date is unknown, use ( ? ).
  • |link= if the name is too long, you may shorten it but keep the correct link here.
  • |link=false use this to avoid redlink.
  • |i= icon filename, renders at 21x21px. If none assigned, a default will be shown. Available icons are defined with the I template.

Copy/Paste

{{Event||date=|link=|i=}}