Difference between revisions of "Template:Color by age/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jason Quinn
(grammar fix)
imported>Jason Quinn
(tweak explanation)
 
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
  
This template is intended to visually indicate an age associated with some text via the background color. The text is redder every year after the given date and fully red if the date is 4 years past. This can be useful, for example, for repetitive tasks in to-do lists to see what items haven't had editor attention for a while if users update the date every time they complete the task.
+
This template is intended to visually indicate an age associated with some text via its background color. Starting one year after the specified date, the background color gets redder ("hotter") each year until after 4 years it is fully red. This can be useful, for example, for repetitive tasks in to-do lists to see what items haven't had editor attention for a while if users update the date every time they complete the task.
  
 
The template currently has five colored tiers:
 
The template currently has five colored tiers:

Latest revision as of 13:21, 23 November 2020

This template is intended to visually indicate an age associated with some text via its background color. Starting one year after the specified date, the background color gets redder ("hotter") each year until after 4 years it is fully red. This can be useful, for example, for repetitive tasks in to-do lists to see what items haven't had editor attention for a while if users update the date every time they complete the task.

The template currently has five colored tiers:

default background
younger than 1 year
lightyellow background
older than 365 days (1 year) but less than 2 years
yellow background
older than 730 days (2 year) but less than 3 years
orange background
older than 1095 days (3 years) but less than 4 years
red background
older than 1460 days (4 years)

Example usage

{{Color by age|July 4, 2012|This is some example text.|note=This is an optional note for the tooltip.}}

which will render as

This is some example text.

because the specified date is old enough to trigger the red background color. It also uses the optional note that is appended to the tooltip.