无编辑摘要 |
无编辑摘要 |
||
第1行: | 第1行: | ||
<includeonly><div style="{{{style|text-align:center;font-size:18px;font-weight:bold;color:red;margin:0px 0px 10px 0px}}};{{{extra_style|}}}"> | <includeonly><div style="{{{style|text-align:center;font-size:18px;font-weight:bold;color:red;margin:0px 0px 10px 0px}}};{{{extra_style|}}}"> | ||
{{#if:{{head|}}|<span>{{{head}}}</span>}}<span class="countdown" data-options="no-leading-zeros;{{#if:{{{short|}}}|short-format}}" {{#if:{{{countup|}}}||data-end="toggle" data-toggle=".{{{class|{{{endClass|countdownComplete{{{2|1}}}}}}}}}"}} style="display:none"> | {{#if:{{{head|}}}|<span>{{{head}}}</span>}}<span class="countdown" data-options="no-leading-zeros;{{#if:{{{short|}}}|short-format}}" {{#if:{{{countup|}}}||data-end="toggle" data-toggle=".{{{class|{{{endClass|countdownComplete{{{2|1}}}}}}}}}"}} style="display:none"> | ||
<span class="countdowndate">{{{1|{{{time|}}}}}}</span> {{#if:{{{countup|}}}|{{{text|{{{endText|}}}}}}}} | <span class="countdowndate">{{{1|{{{time|}}}}}}</span> {{#if:{{{countup|}}}|{{{text|{{{endText|}}}}}}}} | ||
</span>{{#if:{{{countup|}}}|| | </span>{{#if:{{{countup|}}}|| |
2024年6月22日 (六) 16:49的最新版本
Displays a countdown timer.
Parameters
time
or[1]
: time to countdown to, required.countup
: boolean. Timer counts upwards if chosen date has passed. Will override/disregardclass
&[2]
.short
: boolean. Timer text is changed to single letters, e.g. "Days" becomes "d".class
: specify when multiple timers are used on the page,countdownComplete1
by default, e.g.,countdownComplete2
for a second timer, etc.[2]
: alternatively, to only specify a number, e.g.2
for a second timer.
text
: optional completion text,Countdown complete!
by default. Used at end of timer text forcountup
.style
: custom style, optional.extra_style
: extra style to add to the default style, optional.
Examples
{{Timer|January 1 2023 00:00:00 +0900|extra_style = text-align:left}}
{{Timer|January 1 2030 00:00:00 +0900|2|style = font-style:italic|text = Not yet.}}
{{Timer|January 19 2038 12:14:07 +0900|3|style = font-weight:bold|text = The time is now!}}
{{Timer|January 29 2042 12:17:04 +0900|3|style = font-weight:bold|short=true|text = The time is now short!}}
countup Examples
{{Timer|January 1 2020 00:00:00 +0900|countup=true|extra_style = text-align:left}}
{{Timer|January 1 1980 00:00:00 +0900|countup=true|style = font-style:italic|text = ago}}
{{Timer|January 1 1970 00:00:00 +0900|countup=true|style = font-weight:bold|short=true|text = in the past}}
{{Timer|January 19 2038 12:14:07 +0900|countup=true|style = font-weight:bold|text =. Still counts down normally for future dates.}}