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> | + | <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
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.