Difference between revisions of "Template:Event"

From QWiki
m (Ignore me styling live)
m (Ignore me styling live)
Line 3: Line 3:
 
If icon is set - use an image link to display it.
 
If icon is set - use an image link to display it.
 
-->{{#if:{{{icon|}}}|
 
-->{{#if:{{{icon|}}}|
{{!}}style="width:32px;float: left;vertical-align: -webkit-baseline-middle;"{{!}}{{icon/{{lc:{{{icon}}}}}}}|{{!}}style="width:32px;float: left;"{{!}}{{icon/tbd}}}}
+
{{!}}style="width:21px;float: left;vertical-align: -webkit-baseline-middle;"{{!}}{{icon/{{lc:{{{icon}}}}}}}|{{!}}style="width:21px;float: left;"{{!}}{{icon/tbd}}}}
 
{{!}}style="width:80%;padding:0.4em 0 0 0.6em;vertical-align: text-top;float: left;vertical-align: -webkit-baseline-middle;"|{{#if:{{{link|}}}|
 
{{!}}style="width:80%;padding:0.4em 0 0 0.6em;vertical-align: text-top;float: left;vertical-align: -webkit-baseline-middle;"|{{#if:{{{link|}}}|
 
{{#switch: {{{link}}}
 
{{#switch: {{{link}}}

Revision as of 10:58, 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:

Upcoming
-webkit-baseline-middle QHLAN 2021 ?
-webkit-baseline-middle sdCup #2 ?
Ongoing
-webkit-baseline-middle GetQuad! Draft 4 22 Nov – ?
-webkit-baseline-middle Hammer Time Season 3 3 Jan – ?
Completed
-webkit-baseline-middle Nations Cup 16 sep – 21 dec
-webkit-baseline-middle sdCup #1 23 – 24 Jan

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=}}