Difference between revisions of "Template:Yearlist"

m
(40 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<noinclude><div style="color:red; font-size:large; font-weight:bold; margin-bottom:30px; text-align:center">DRAFT: DO NOT USE</div></noinclude>
+
<!--
 +
pre-STAR LEAGUE: earlier than and including 2004
 +
STAR LEAGUE: 2005 - 2780
 +
SUCCESSION WARS: 2781 – 3049
 +
CLAN INVASION: 3050 – 3061
 +
CIVIL WAR: 3062 – 3067
 +
JIHAD: 3068 – 3081
 +
DARK AGE: 3082 - 3152
 +
IlClan: 3152 - ????
 +
//-->
 +
<div class='text-align: center'>
 
{| align="center" cellspacing="3" style="border:2px solid #000"
 
{| align="center" cellspacing="3" style="border:2px solid #000"
| rowspan="2" style="padding:0 3px 0 2px" | [[Image:{{#switch: {{lc:{{{era}}}}} | civil war = Civil war era-BW.jpg | dark age = Dark age era-BW.jpg | Civil war era-BW.jpg}}]]
+
| rowspan="2" style="padding:0 3px 0 2px" | [[Image:{{#iferror: {{#ifexpr: {{PAGENAME}} >= 3152 | ILClan_Era.jpg |
| colspan="9" style="border-bottom:1px solid #000; font-size:120%; font-weight:bold; text-align:center; text-transform:uppercase" | [[{{#switch: {{lc:{{{era}}}}} | civil war = Civil War era | dark age = Dark Age era | Civil War era}}]]
+
    {{#ifexpr: {{PAGENAME}} >= 3082 | Dark age era-BW.jpg |
 +
      {{#ifexpr: {{PAGENAME}} >= 3067 | Jihad era-BW.jpg |
 +
        {{#ifexpr: {{PAGENAME}} >= 3062 | Civil war era-BW.jpg |
 +
          {{#ifexpr: {{PAGENAME}} >= 3050 | Clan invasion era-BW.jpg |  
 +
            {{#ifexpr: {{PAGENAME}} >= 2781 | Succession wars era-BW.jpg |  
 +
              {{#ifexpr: {{PAGENAME}} >= 2005 | Star league era-BW.jpg | Madcat.gif }}
 +
            }}
 +
          }}
 +
        }}
 +
      }}
 +
    }}
 +
  }} | Madcat.gif }}|50px]]
 +
| colspan="9" style="border-bottom:1px solid #000; font-size:120%; font-weight:bold; text-align:center; text-transform:uppercase" | [[{{#iferror: {{#ifexpr: {{PAGENAME}} >= 3152 | ilClan era |
 +
    {{#ifexpr: {{PAGENAME}} >= 3082 | Dark Age era |
 +
      {{#ifexpr: {{PAGENAME}} >= 3067 | Jihad era |
 +
        {{#ifexpr: {{PAGENAME}} >= 3062 | Civil War era |
 +
          {{#ifexpr: {{PAGENAME}} >= 3050 | Clan Invasion era |
 +
            {{#ifexpr: {{PAGENAME}} >= 2781 | Succession Wars era |  
 +
              {{#ifexpr: {{PAGENAME}} >= 2005 | Star League era | pre-Star League era }}
 +
            }}
 +
          }}
 +
        }}
 +
      }}
 +
    }}
 +
  }} | Timeline }}]]
 
|-
 
|-
| [[{{#expr: {{{year|}}}-4 }}]] |
+
| [[{{#if: {{{before4|}}} | {{{before4}}} | {{#iferror: {{#expr: {{PAGENAME}}-4 }} | ???? }} }}]] |
| [[{{#expr: {{{year|}}}-3 }}]] |
+
| [[{{#if: {{{before3|}}} | {{{before3}}} | {{#iferror: {{#expr: {{PAGENAME}}-3 }} | ???? }} }}]] |
| [[{{#expr: {{{year|}}}-2 }}]] |
+
| [[{{#if: {{{before2|}}} | {{{before2}}} | {{#iferror: {{#expr: {{PAGENAME}}-2 }} | ???? }} }}]] |
| [[{{#expr: {{{year|}}}-1 }}]] |
+
| [[{{#if: {{{before1|}}} | {{{before1}}} | {{#iferror: {{#expr: {{PAGENAME}}-1 }} | ???? }} }}]] |
| style="font-size:140%; font-weight:bold" | [[{{{year|1234}}}]]
+
| style="font-size:130%; font-weight:bold" | [[{{#if: {{{year|}}} | {{{year}}} | {{PAGENAME}} }}]]
| | | [[{{#expr: {{{year|}}}+1 }}]] |
+
| | | [[{{#if: {{{after1|}}} | {{{after1}}} | {{#iferror: {{#expr: {{PAGENAME}}+1 }} | ???? }} }}]] |
| [[{{#expr: {{{year|}}}+2 }}]] |
+
| [[{{#if: {{{after2|}}} | {{{after2}}} | {{#iferror: {{#expr: {{PAGENAME}}+2 }} | ???? }} }}]] |
| [[{{#expr: {{{year|}}}+3 }}]] |
+
| [[{{#if: {{{after3|}}} | {{{after3}}} | {{#iferror: {{#expr: {{PAGENAME}}+3 }} | ???? }} }}]] |
| [[{{#expr: {{{year|}}}+4 }}]]
+
| [[{{#if: {{{after4|}}} | {{{after4}}} | {{#iferror: {{#expr: {{PAGENAME}}+4 }} | ???? }} }}]]
|}<noinclude>[[Category:Templates]]</noinclude>
+
|-
 +
|}
 +
</div>
 +
<div style="font-size:smaller; text-align:center">Find all references to year [[Special:Whatlinkshere/{{PAGENAME}}|{{PAGENAME}}]]  -  '''One link per entry''' (See [[Policy:Year Pages|Years Policy]]) </div> [[Category:Years]]
 +
<noinclude>
 +
{{/doc}}
 +
</noinclude>

Revision as of 15:20, 14 June 2021

Find all references to year Yearlist - One link per entry (See Years Policy)


The {{yearlist}} template is used in articles about a particular year (such as 3136). It shows the four proceeding years, the four following years, and automatically indicates to which era the current year belongs. When there is no formally-named era for the particular year the template will display TIMELINE.

The template should be placed at the top of the article.


Basic Usage

{{yearlist}}

Example

When placed in the article about 3136, the template will display:

Dark age era-BW.jpg Dark Age era
3132 | 3133 | 3134 | 3135 | 3136 | 3137 | 3138 | 3139 | 3140
Find all references to year 3136


Advanced Usage

If needed, the editor can specify exactly which years to show in the template, instead of having the template automatically choose which years to display. To override the years you can include any of the following options:

Overriding years

{{yearlist
| before4 = 
| before3 = 
| before2 = 
| before1 = 
| year = 
| after1 = 
| after2 = 
| after3 = 
| after4 = 
}}

Example

This text:

{{yearlist
| before4 = 1000
| before3 = 1100
| before2 = 2000
| before1 = 2100
| year = 2784
| after1 = 2500
| after2 = 2600
| after3 = 2900
| after4 = 3000
}}

Will display:

Find all references to year Yearlist - One link per entry (See Years Policy)


How are eras determined?

The starting and ending dates are taken from the BattleTech eras entry. Discussions about changing the dates should be made on the BattleTech eras' talk page.