Template:DayNav: Difference between revisions
No edit summary |
(Removing again for now, to be worked out later.) Tag: 2017 source edit |
||
(87 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{wikipediainfo}}{| class="timeline" | <includeonly>{{wikipediainfo|{{dadate}}}}{| class="timeline" | ||
| | | | ||
{{#switch:{{#sub:{{PAGENAME}}|-5|}} | {{#switch:{{#sub:{{dda|{{PAGENAME}}}}|-5|}} | ||
|nuary=[[December]] | |nuary=[[December {{daydab}}|Dec]] | ||
|ruary=[[January]] | |ruary=[[January {{daydab}}|Jan]] | ||
|March=[[February]] | |March=[[February {{daydab}}|Feb]] | ||
|April=[[March]] | |April=[[March {{daydab}}|Mar]] | ||
| June=[[May]] | | June=[[May {{daydab}}|May]] | ||
| July=[[June]] | | July=[[June {{daydab}}|Jun]] | ||
|ugust=[[July]] | |ugust=[[July {{daydab}}|Jul]] | ||
|ember={{#switch:{{#sub:{{PAGENAME}}|-6|}} | |ember={{#switch:{{#sub:{{dda|{{PAGENAME}}}}|-6|}} | ||
|tember=[[August]] | |tember=[[August {{daydab}}|Aug]] | ||
|vember=[[October]] | |vember=[[October {{daydab}}|Oct]] | ||
|cember=[[November]] }} | |cember=[[November {{daydab}}|Nov]]}} | ||
|tober=[[September]] | |tober=[[September {{daydab}}|Sep]] | ||
|#default=[[April]] | |#default=[[April {{daydab}}|Apr]] | ||
}} | }} | ||
| | |style=font-size:150%;font-weight:bold| | ||
{{#switch:{{#sub:{{PAGENAME}}|-5|}} | {{#switch:{{#sub:{{dda|{{PAGENAME}}}}|-5|}} | ||
|nuary=[[January]] | |nuary=[[January {{daydab}}|January]] | ||
|ruary=[[February]] | |ruary=[[February {{daydab}}|February]] | ||
|March=[[March]] | |March=[[March {{daydab}}|March]] | ||
|April=[[April]] | |April=[[April {{daydab}}|April]] | ||
| June=[[June]] | | June=[[June {{daydab}}|June]] | ||
| July=[[July]] | | July=[[July {{daydab}}|July]] | ||
|ugust=[[August]] | |ugust=[[August {{daydab}}|August]] | ||
|ember={{#switch:{{#sub:{{PAGENAME}}|-6|}} | |ember={{#switch:{{#sub:{{dda|{{PAGENAME}}}}|-6|}} | ||
|tember=[[September]] | |tember=[[September {{daydab}}|September]] | ||
|vember=[[November]] | |vember=[[November {{daydab}}|November]] | ||
|cember=[[December]] }} | |cember=[[December {{daydab}}|December]]}} | ||
|tober=[[October]] | |tober=[[October {{daydab}}|October]] | ||
|#default=[[May]] | |#default=[[May {{daydab}}|May]] | ||
}} | }} | ||
<!--next month--> | <!--next month--> | ||
| style=" | | style="" | | ||
{{#switch:{{#sub:{{PAGENAME}}|-5|}} | {{#switch:{{#sub:{{dda|{{PAGENAME}}}}|-5|}} | ||
|nuary=[[February]] | |nuary=[[February {{daydab}}|Feb]] | ||
|ruary=[[March]] | |ruary=[[March {{daydab}}|Mar]] | ||
|March=[[April]] | |March=[[April {{daydab}}|Apr]] | ||
|April=[[May]] | |April=[[May {{daydab}}|May]] | ||
| June=[[July]] | | June=[[July {{daydab}}|Jul]] | ||
| July=[[August]] | | July=[[August {{daydab}}|Aug]] | ||
|ugust=[[September]] | |ugust=[[September {{daydab}}|Sep]] | ||
|ember={{#switch:{{#sub:{{PAGENAME}}|-6|}} | |ember={{#switch:{{#sub:{{dda|{{PAGENAME}}}}|-6|}} | ||
|tember=[[October]] | |tember=[[October {{daydab}}|Oct]] | ||
|vember=[[December]] | |vember=[[December {{daydab}}|Dec]] | ||
|cember=[[January]] }} | |cember=[[January {{daydab}}|Jan]]}} | ||
|tober=[[November]] | |tober=[[November {{daydab}}|Nov]] | ||
|#default=[[June]] | |#default=[[June {{daydab}}|Jun]] | ||
}} | }} | ||
| | |} | ||
| | {|class=timeline | ||
|- | |-style= | ||
| | | | ||
| | | | ||
Line 59: | Line 58: | ||
| | | | ||
| | | | ||
| '''[[1 {{month}} {{daydab}}|1]]''' | | style="padding-top:10px" | '''[[1 {{month}} {{daydab}}|1]]''' | ||
|- | |- | ||
| '''[[2 {{month}} {{daydab}}|2]]''' | | '''[[2 {{month}} {{daydab}}|2]]''' | ||
Line 93: | Line 92: | ||
| '''[[29 {{month}} {{daydab}}|29]]''' | | '''[[29 {{month}} {{daydab}}|29]]''' | ||
|- | |- | ||
| '''{{#switch:{{month}}|February=|#default=[[30 {{month}} {{daydab}}|30]]}}''' | | style=padding-bottom:10px | '''{{#switch:{{month}}|February=|#default=[[30 {{month}} {{daydab}}|30]]}}''' | ||
| '''{{#switch:{{month}}|January|March|May|July|August|October|December=[[31 {{month}} {{daydab}}|31]]|#default=}}''' | | style=padding-bottom:10px |'''{{#switch:{{month}}|January|March|May|July|August|October|December=[[31 {{month}} {{daydab}}|31]]|#default=}}''' | ||
| | | | ||
| | | | ||
Line 100: | Line 99: | ||
| | | | ||
| | | | ||
|}</includeonly><noinclude>[[Category: | |}</includeonly><noinclude>[[Category:DayNav templates|{{PAGENAME}}]]{{documentation}}</noinclude> |
Latest revision as of 10:12, 1 January 2022
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
What it does
When placed onto a page in the format of 3 January, this template will automatically determine that the month is January, then link each day number on its calendar to January. It also provides the surrounding months so that users can easily navigate to other months.
What it doesn't do
It doesn't contextualize the number of days that are actually in a particular month. The layout of the calendar does not vary depending upon the month, so February appears to have the same 31 days as March. However, red links do show, thus giving each month a kind of unique look.
How it works
The main "trick" of the template is to look at the name of the page, truncate the last five letters, substitute the full month name, then append that name to a number, thus providing [day number + month name]. If it's on the page 5 October, for instance, it grabs "tober" from the page name, then realizes that means October. It then puts up a blank calendar with 31 days. With every number on the calendar, it then combines the cardinal form of the number (1st, 2nd, 3rd) with the derived month name, and links to it. Hence, from the single act of determining that the last five letters of the page name are "tober", it can easily link to all 31 days in the month of October.
Four months, however, don't follow this pattern. For September, November and December, the template reads the last 6 letters of the page name to determine which of the "ember" months it's dealing with. Meanwhile, the month of May is treated as the default month, since the brevity of its name is unique.
The underlying styling of the template, such as the shadow-y elments that affect the box, and most of the text styling, are controlled through CSS, and thus will not be directly visible by viewing the source of this page.
Credit
This template is in almost every respect unique to this wiki. However, the actual layout of the 31 numbers on the page was derived from wikipedia:template:January 2005/events.