Template:Countdown/doc

From Saintapedia
Jump to navigation Jump to search

The Countdown template displays a countdown box showing the number of days until some event. Once the date has passed, the countdown box will disappear.

Parameters

|Date= The date of the event. This should be the first parameter if parameter names are not used. Dates can be specified in a number of ways--see the examples below for some alternatives. Note that if the date uses hyphens as separators, it must be in year-month-day order (e.g., 2025-01-23), while if slashes are used, it must be in month/day/year order (e.g., 1/23/2025).
|Event= The event that is being counted down to. This should be the second parameter if parameter names are not used. The default is event if this parameter is omitted.
|Until= If you want a different term than "until" in the caption, use this parameter to specify what to use instead

Formatting parameters

A number of formatting parameters are also available to customize the display of the countdown box.

|Font= Set the font face to display the countdown in. The default font is Mono. You can specify a fallback list where the second font will be used if the first is not available, and the third if neither the first or second are available, . . . by listing multiple fonts, separated by commas.
|Size= Set the font size in pixels for the countdown to appear in. The default is 74.
|Alignment= Set the alignment for the countdown. The default is "right". Please make sure to use quotes around this variable such as "left".
|Color= Set the font color for the countdown. The default is black.
|Background= Set a background color for the font to appear in. The default is #fdfdfa.
|Width= Set the width, in pixels, for the countdown box. The default is 250.
|Border= Set a color for the border lines of the box around the countdown. The default is #ccc.
|shadow= Set a color for the shadow for the countdown box. Note that the shadow will not appear for some users, depending upon the browser they are using. The default is #ccc.
|CaptionFont= Set the font face for the caption text below the countdown. The default is Cambria, serif.
|CaptionSize= Set the size in pixels for the caption text. The default is 18.
|CaptionColor= Set a color for the caption text. The default is #2f4f4f.

Usage

What you type What you get
{{ Countdown | 1/24/2025| tomorrow}} 2025-01-24
1
Day until tomorrow
{{ Countdown | 1/23/25| today}} 2025-01-23
0
Days until today
{{ Countdown | date=January 22, 2025| event=yesterday}} 2025-01-22
{{ Countdown | Jan 30, 25}} 2025-01-30
7
Days until event
{{Countdown | Date=2025-2-2| Event=Groundhog's Day| until=left to sleep before| color=Tan| border=Wheat| background=SaddleBrown| CaptionColor=Sienna}} 2025-02-02
10
Days left to sleep before Groundhog's Day
{{ Countdown }}
No date specified for countdown

No description.

Template parameters

ParameterDescriptionTypeStatus
DateDate

The date of the event. This should be the first parameter if parameter names are not used. Dates can be specified in a number of ways--see the examples below for some alternatives. Note that if the date uses hyphens as separators, it must be in year-month-day order (e.g., 2021-03-10), while if slashes are used, it must be in month/day/year order (e.g., 3/10/2021).

Unknownsuggested
CaptionFontCaptionFont

no description

Unknownoptional
CaptionfontCaptionfont

no description

Unknownoptional
captionfontcaptionfont

no description

Unknownoptional
AlignmentAlignment

no description

Unknownoptional
alignmentalignment

no description

Unknownoptional
BackgroundBackground

no description

Unknownoptional
backgroundbackground

no description

Unknownoptional
BorderBorder

no description

Unknownoptional
borderborder

no description

Unknownoptional
WidthWidth

no description

Unknownoptional
widthwidth

no description

Unknownoptional
ShadowShadow

no description

Unknownoptional
shadowshadow

no description

Unknownoptional
ColorColor

no description

Unknownoptional
colorcolor

no description

Unknownoptional
FontFont

no description

Unknownoptional
fontfont

no description

Unknownoptional
SizeSize

no description

Unknownoptional
sizesize

no description

Unknownoptional
CaptionColorCaptionColor

no description

Unknownoptional
CaptioncolorCaptioncolor

no description

Unknownoptional
captioncolorcaptioncolor

no description

Unknownoptional
CaptionSizeCaptionSize

no description

Unknownoptional
CaptionsizeCaptionsize

no description

Unknownoptional
captionsizecaptionsize

no description

Unknownoptional
UntilUntil

no description

Unknownoptional
untiluntil

no description

Unknownoptional
EventEvent

no description

Unknownsuggested
eventevent

no description

Unknownoptional