Difference between revisions of "Template:Event"

From QWiki
m (Ignore me styling live)
m (Ignore me styling live)
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><!--
|style="padding:0.4em 0 0 0.6em;vertical-align: text-top;background-color:#fff;"|{{#if:{{{link|}}}|
+
 
 +
If icon (i) is set - use an image link to display it.
 +
-->{{#if:{{{i|}}}|
 +
{{!}}style="width:21px;float: left;vertical-align: -webkit-baseline-middle;padding:0.4em 0 0 0.6em;"{{!}}{{i/{{lc:{{{i}}}}}}}|{{!}}style="width:21px;float: left;vertical-align: -webkit-baseline-middle;padding:0.4em 0 0 0.6em;"{{!}}{{i/tbd}}}}
 +
{{!}}style="width:80%;padding:0.5em 0 0 0.8em;float: left;"|{{#if:{{{link|}}}|
 
{{#switch: {{{link}}}
 
{{#switch: {{{link}}}
 
|false={{{1}}}
 
|false={{{1}}}
Line 6: Line 10:
 
|[[{{{link}}}|{{{1}}}]]}}
 
|[[{{{link}}}|{{{1}}}]]}}
 
|{{#if:{{{1|}}}|[[{{{1}}}]]|&nbsp;}}}}
 
|{{#if:{{{1|}}}|[[{{{1}}}]]|&nbsp;}}}}
|style="font-size:75%;text-align:right;padding-right:5px;vertical-align: text-top;background-color:rgba(254, 238, 234, 0.3);"| {{#if:{{{date|fest}}}|{{{date}}}|&nbsp;}}
+
|style="font-size:75%;text-align:right;padding:0 5px 1px 0;vertical-align: bottom;"| {{#if:{{{date|}}}|{{{date}}}|&nbsp;}}
 
|-
 
|-
 
</includeonly>
 
</includeonly>
 
<noinclude>{{documentation}}</noinclude>
 
<noinclude>{{documentation}}</noinclude>

Latest revision as of 20:50, 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
QHLAN QHLAN 2021 ?
sdCup sdCup #2 ?
Ongoing
GetQuad! GetQuad! Draft 4 22 Nov – ?
Hammer Time Hammer Time Season 3 3 Jan – ?
Completed
Nations Cup Nations Cup 16 sep – 21 dec
sdCup 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=}}