Difference between revisions of "Template:Countdown"

From QWiki
(Created page with "<includeonly><span class="timer-object {{#if:{{{rawcountdown|}}}|timer-object-countdown-only}}" {{#ifeq:{{{finished|}}}|true|data-finished="finished"}} {{#if:{{{stream|}}}|dat...")
 
(Creating first version - this could be done to cater for many layout options - to be continued)
 
Line 1: Line 1:
<includeonly><span class="timer-object {{#if:{{{rawcountdown|}}}|timer-object-countdown-only}}" {{#ifeq:{{{finished|}}}|true|data-finished="finished"}} {{#if:{{{stream|}}}|data-stream-tl="{{{stream|}}}"}} {{#if:{{{twitch|}}}|data-stream-twitch="{{{twitch|}}}"}} {{#if:{{{afreeca|}}}|data-stream-afreeca="{{{afreeca|}}}"}} {{#if:{{{afreecatv|}}}|data-stream-afreecatv="{{{afreecatv|}}}"}} {{#if:{{{dailymotion|}}}|data-stream-dailymotion="{{{dailymotion|}}}"}} {{#if:{{{douyu|}}}|data-stream-douyu="{{{douyu|}}}"}} {{#if:{{{huomao|}}}|data-stream-huomao="{{{huomao|}}}"}} {{#if:{{{smashcast|}}}|data-stream-smashcast="{{{smashcast|}}}"}} {{#if:{{{youtube|}}}|data-stream-youtube="{{{youtube|}}}"}} {{#if:{{{text|}}}|data-countdown-end-text="{{{text|}}}"}} {{#if:{{{separator|}}}|data-separator="{{{separator|}}}"}}>{{{date}}}</span></includeonly><noinclude>{{documentation}}</noinclude>
+
<includeonly>{{#if:{{{date|}}}|<div>{{#ifeq:{{{finished|}}}|true|{{{date}}}|{{#if:{{{stream|}}}|<span class="hasStream">[http://twitch.tv/{{{stream|}}} {{{stream|}}}] {{#if:{{{stream2|}}}|<span class="hasStream">[http://twitch.tv/{{{stream2|}}} {{{stream2|}}}]</span>|}}</span><br />|}}<span class="datetime">{{{date}}}</span> – <span class="countdown"></span>}}</div>}}
 +
{{#vardefine:timezone|{{#explode:{{#explode:{{{date|}}}|data-tz="|1}}|"|0}}}}</includeonly><noinclude>{{documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 09:29, 11 February 2021

Documentation (view - edit)

This templated is used to display a countdown to a set date, and if present, also show twitch link.

Example

suddendeathTV
February 14, 2023 12:10 CET

Code

{{Countdown
|date=February 14, 2023 12:10 {{Abbr/CET}}
|stream=suddendeathTV
|stream2=
|finished=
}}

Use

|date=
Set the date with format: Month day, year HH:MM TIMEZONE.
If the date is in the future, the countdown will show.
If the date is in the past, the date will show but without countdown.
|stream=
(Optional) Add a link to a stream. Use only stream name, not full url.
|stream2=
(Optional) Add a link to a second stream. Use only stream name, not full url.
|finished=
(Optional) Set this to "true" to hide the countdown.