Difference between revisions of "Template:Recurrence"

From Nookipedia, the Animal Crossing wiki
(Updating to use CSS styled table)
 
Line 1: Line 1:
<includeonly>{| class="unsortable roundCorners" align=center style="background: #66A6FF; border: 4px solid #66A6FF; {{#if: {{{fullwidth|}}}| width: 99%; | }} {{roundy|14px}}"
+
<includeonly>{| class="unsortable styled roundCorners color-event" align=center style="margin: 0 auto; text-align: center; {{#if: {{{fullwidth|}}}| width: 99%; | }}"
 
|-
 
|-
! rowspan=2 style="font-weight: normal; font-family: Coustard; font-size: 1.0em; padding: 0px 5px; text-align:center; width:150px; background-color:#b3d2ff; {{roundytl|9px}}"| Game
+
! rowspan=2 style="width: 100px;" | Game
! rowspan=2 width=400px style="font-weight: normal; font-family: Coustard; font-size: 1.0em; padding: 0px 5px; text-align:center; background-color:#b3d2ff;"| Recurrence
+
! rowspan=2 style="width: 400px;" | Recurrence
! width=150px style="font-weight: normal; font-family: Coustard; font-size: 1.0em; padding: 0px 5px; text-align:center; background-color:#b3d2ff;"| This year
+
! style="width: 150px;" | This year
! width=150px style="font-weight: normal; font-family: Coustard; font-size: 1.0em; padding: 0px 5px; text-align:center; background-color:#b3d2ff; {{roundytr|9px}}"| Next year
+
! style="width: 150px;" | Next year
 
|-
 
|-
! width=150px style="font-weight: normal; font-family: Coustard; font-size: 1.0em; padding: 0px 5px; background-color:#cce0ff;"| {{LOCALYEAR}}  
+
! {{LOCALYEAR}}  
! width=150px style="font-weight: normal; font-family: Coustard; font-size: 1.0em; padding: 0px 5px; background-color:#cce0ff;"| {{#expr:{{LOCALYEAR}} +1}}
+
! {{#expr:{{LOCALYEAR}} +1}}
 
|-
 
|-
{{#if:{{{dnm-recurrence|}}}|{{!}} align=center style="background: #e6f0ff;" {{!}} '''{{DnM}}'''
+
{{#if:{{{dnm-recurrence|}}}|!                                                         {{!}} {{DnM}}
{{!}} {{#if:{{{dnm-rowspan|}}}|rowspan={{{dnm-rowspan|}}}|}} style="background: #fff;"                 {{!}}  
+
{{!}} {{#if:{{{dnm-rowspan|}}}|rowspan={{{dnm-rowspan|}}}|}} style="text-align: left;" {{!}}  
{{{dnm-recurrence|}}}
+
{{{dnm-recurrence|x}}}
{{!}} {{#if:{{{dnm-rowspan|}}}|rowspan={{{dnm-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{dnm-thisyear|}}}
+
{{!}} {{#if:{{{dnm-rowspan|}}}|rowspan={{{dnm-rowspan|}}}|}}                           {{!}} {{{dnm-thisyear|}}}
{{!}} {{#if:{{{dnm-rowspan|}}}|rowspan={{{dnm-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{dnm-nextyear|}}}|}}  
+
{{!}} {{#if:{{{dnm-rowspan|}}}|rowspan={{{dnm-rowspan|}}}|}}                           {{!}} {{{dnm-nextyear|}}}|}}  
 
|-
 
|-
{{#if:{{{ac-recurrence|}}}|{{!}} align=center style="background: #e6f0ff;" {{!}} {{#switch:{{{ac-title|}}}| DnM = '''{{DnM}}'''<br>'''{{DnMe+}}'''| e+ = '''{{PG}}<br>{{DnMe+}}'''| DnM+AC = '''{{DnM}}<br>{{PG}}<br>{{DnMe+}}'''| #default = '''{{PG}}'''}}
+
{{#if:{{{ac-recurrence|}}}|!                                                           {{!}} {{#switch:{{{ac-title|}}}| DnM = {{DnM}}<br>{{DnMe+}}| e+ = {{PG}}<br>{{DnMe+}}| DnM+AC = {{DnM}}<br>{{PG}}<br>{{DnMe+}}| #default = '''{{PG}}'''}}
{{!}} {{#if:{{{ac-rowspan|}}}|rowspan={{{ac-rowspan|}}}|}} style="background: #fff;"                {{!}}  
+
{{!}} {{#if:{{{ac-rowspan|}}}|rowspan={{{ac-rowspan|}}}|}} style="text-align: left;   {{!}}  
{{{ac-recurrence|}}}
+
{{{ac-recurrence|X}}}
{{!}} {{#if:{{{ac-rowspan|}}}|rowspan={{{ac-rowspan|}}}|}} align=center style="background: #fff;"   {{!}} {{{ac-thisyear|}}}
+
{{!}} {{#if:{{{ac-rowspan|}}}|rowspan={{{ac-rowspan|}}}|}}"                           {{!}} {{{ac-thisyear|}}}
{{!}} {{#if:{{{ac-rowspan|}}}|rowspan={{{ac-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{ac-nextyear|}}}|}}
+
{{!}} {{#if:{{{ac-rowspan|}}}|rowspan={{{ac-rowspan|}}}|}}"                           {{!}} {{{ac-nextyear|}}}|}}
 
|-
 
|-
{{#if:{{{ww-recurrence|}}}|{{!}} align=center style="background: #e6f0ff;" {{!}} '''{{WW|short}}'''
+
{{#if:{{{ww-recurrence|}}}|!                                                           {{!}} {{WW|short}}
{{!}} {{#if:{{{ww-rowspan|}}}|rowspan={{{ww-rowspan|}}}|}} style="background: #fff;"                 {{!}}  
+
{{!}} {{#if:{{{ww-rowspan|}}}|rowspan={{{ww-rowspan|}}}|}} style="text-align: left;"   {{!}}  
{{{ww-recurrence|}}}
+
{{{ww-recurrence|X}}}
{{!}} {{#if:{{{ww-rowspan|}}}|rowspan={{{ww-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{ww-thisyear|}}}
+
{{!}} {{#if:{{{ww-rowspan|}}}|rowspan={{{ww-rowspan|}}}|}}                             {{!}} {{{ww-thisyear|}}}
{{!}} {{#if:{{{ww-rowspan|}}}|rowspan={{{ww-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{ww-nextyear|}}}|}}
+
{{!}} {{#if:{{{ww-rowspan|}}}|rowspan={{{ww-rowspan|}}}|}}                             {{!}} {{{ww-nextyear|}}}|}}
 
|-
 
|-
{{#if:{{{cf-recurrence|}}}|{{!}} align=center style="background: #e6f0ff;" {{!}} '''{{CF|short}}'''
+
{{#if:{{{cf-recurrence|X}}}|!                                                         {{!}} {{CF|short}}
{{!}} {{#if:{{{cf-rowspan|}}}|rowspan={{{cf-rowspan|}}}|}} style="background: #fff;"                 {{!}}  
+
{{!}} {{#if:{{{cf-rowspan|}}}|rowspan={{{cf-rowspan|}}}|}} style="text-align: left;"   {{!}}  
 
{{{cf-recurrence|}}}
 
{{{cf-recurrence|}}}
{{!}} {{#if:{{{cf-rowspan|}}}|rowspan={{{cf-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{cf-thisyear|}}}
+
{{!}} {{#if:{{{cf-rowspan|}}}|rowspan={{{cf-rowspan|}}}|}}                             {{!}} {{{cf-thisyear|}}}
{{!}} {{#if:{{{cf-rowspan|}}}|rowspan={{{cf-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{cf-nextyear|}}}|}}
+
{{!}} {{#if:{{{cf-rowspan|}}}|rowspan={{{cf-rowspan|}}}|}}                             {{!}} {{{cf-nextyear|}}}|}}
 
|-
 
|-
{{#if:{{{nl-recurrence|}}}|{{!}} align=center style="background: #e6f0ff;" {{!}} '''{{NL|short}}'''
+
{{#if:{{{nl-recurrence|X}}}|!                                                         {{!}} {{NL|short}}
{{!}} {{#if:{{{nl-rowspan|}}}|rowspan={{{nl-rowspan|}}}|}} style="background: #fff;"                 {{!}}  
+
{{!}} {{#if:{{{nl-rowspan|}}}|rowspan={{{nl-rowspan|}}}|}} style="text-align: left;"   {{!}}  
 
{{{nl-recurrence|}}}
 
{{{nl-recurrence|}}}
{{!}} {{#if:{{{nl-rowspan|}}}|rowspan={{{nl-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{nl-thisyear|}}}
+
{{!}} {{#if:{{{nl-rowspan|}}}|rowspan={{{nl-rowspan|}}}|}}                             {{!}} {{{nl-thisyear|}}}
{{!}} {{#if:{{{nl-rowspan|}}}|rowspan={{{nl-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{nl-nextyear|}}}|}}
+
{{!}} {{#if:{{{nl-rowspan|}}}|rowspan={{{nl-rowspan|}}}|}}                             {{!}} {{{nl-nextyear|}}}|}}
 
|-
 
|-
{{#if:{{{nh-recurrence|}}}|{{!}} align=center style="background: #e6f0ff;" {{!}} '''{{NH|short}}'''
+
{{#if:{{{nh-recurrence|X}}}|!                                                         {{!}} {{NH|short}}
{{!}} {{#if:{{{nh-rowspan|}}}|rowspan={{{nh-rowspan|}}}|}} style="background: #fff;"                 {{!}}  
+
{{!}} {{#if:{{{nh-rowspan|}}}|rowspan={{{nh-rowspan|}}}|}} style="text-align: left;"   {{!}}  
 
{{{nh-recurrence|}}}
 
{{{nh-recurrence|}}}
{{!}} {{#if:{{{nh-rowspan|}}}|rowspan={{{nh-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{nh-thisyear|}}}
+
{{!}} {{#if:{{{nh-rowspan|}}}|rowspan={{{nh-rowspan|}}}|}}                             {{!}} {{{nh-thisyear|}}}
{{!}} {{#if:{{{nh-rowspan|}}}|rowspan={{{nh-rowspan|}}}|}} align=center style="background: #fff;"    {{!}} {{{nh-nextyear|}}}|}}
+
{{!}} {{#if:{{{nh-rowspan|}}}|rowspan={{{nh-rowspan|}}}|}}                             {{!}} {{{nh-nextyear|}}}|}}
 
|}</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
 
|}</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 07:01, May 18, 2024

Template documentation (view)


Usage

{{Recurrence
 | fullwidth          =

 | ac-title           =
 | <game>-recurrence  = 
 | <game>-thisyear    =
 | <game>-nextyear    =
}}

This template is to be used for Event articles to show recurring dates for when they occur each year. Template:Recurrence date can be used to generate dates for events that do not take place on a specific date, but instead occur at specific times of the year (e.g. second Sunday of October). Events with a fixed date every year should be input as plain text.

Rows can be created for each relevant game using dnm, ac, ww, cf, nl, and nh. The table can be adjusted to span the full width of the page using fullwidth = yes.

The ac-title parameter adjusts the display of the Animal Crossing row, and can be toggled between DNM to display titles for bothDoubutsu no Mori and Doubutsu no Mori e+, e+ to show titles for both Animal Crossing and Doubutsu no Mori e+, and DNM+AC to show titles for all three variants of the game.

Example

{{Recurrence
 | cf-recurrence =
* On the Monday before {{wp|Ash Wednesday}}
 | cf-thisyear   = {{Recurrence date|day=Monday|month=February|week=Third|showfullmonth=Yes}}
 | cf-nextyear   = {{Recurrence date|day=Monday|month=February|week=Fifth|showfullmonth=Yes|next=yes}}

 | nl-recurrence = 
* On the Monday before {{wp|Ash Wednesday}}
 | nl-thisyear   = {{Recurrence date|day=Monday|month=February|week=Third|showfullmonth=Yes}}
 | nl-nextyear   = {{Recurrence date|day=Monday|month=February|week=Fifth|showfullmonth=Yes|next=yes}}

 | nh-recurrence = 
* On the Monday before {{wp|Ash Wednesday}}
 | nh-thisyear   = {{Recurrence date|day=Monday|month=February|week=Third|showfullmonth=Yes}}
 | nh-nextyear = {{Recurrence date|day=Monday|month=February|week=Fifth|showfullmonth=Yes|next=yes}}
}}
Game Recurrence This year Next year
2024 2025
City Folk February 19
New Leaf February 19
New Horizons February 19