• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Template:Timer"

From Kancolle Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
<span class="{{{class|{{{endClass|countdownComplete1}}}}}}" style="display:none">{{{text|{{{endText|Countdown complete!}}}}}}</span>
 
<span class="{{{class|{{{endClass|countdownComplete1}}}}}}" style="display:none">{{{text|{{{endText|Countdown complete!}}}}}}</span>
 
</div></includeonly><noinclude>
 
</div></includeonly><noinclude>
 +
Displays a countdown timer.
 
==Parameters==
 
==Parameters==
 
* <code>time</code> : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse time] to countdown to, required.
 
* <code>time</code> : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse time] to countdown to, required.

Revision as of 09:14, 1 May 2021

Displays a countdown timer.

Parameters

  • time : time to countdown to, required.
  • style : custom style, optional.
  • extra_style : extra style to add to the default style, optional.
  • class : specify when multiple timers are used on the page, countdownComplete1 by default, e.g., countdownComplete2 for a second timer, etc.
  • text : optional completion text, Countdown complete! by default.

See MediaWiki:Gadget-Countdown.js for JS implementation details.

Examples

{{Timer|time = January 1 2021 00:00:00 +0900|extra_style = text-align:left}}

{{Timer
|time = January 1 2025 00:00:00 +0900
|style = font-style:italic
|class = countdownComplete2
|text = Not yet.
}}

{{Timer
|time = January 19 2038 12:14:07 +0900
|style = font-weight:bold
|class = countdownComplete2
|text = The time is now!
}}