|
|
| Line 1: |
Line 1: |
| <includeonly><tr>
| |
| <th colspan="4" style="background-color: #f1f5f9; color: #0b132b; text-align: center; font-weight: bold; padding: 6px;">GLOBAL NEWS</th>
| |
| </tr>
| |
|
| |
|
| <!-- MACRO FOR DAY ROWS -->
| |
| {{#define: RENDER_DAY |
| |
| {{#if: {{{Day{{{1}}}_P1|}}} |
| |
| <tr>
| |
| <td rowspan="{{#expr: 1 + {{#if:{{{Day{{{1}}}_P2|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P3|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P4|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P5|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P6|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P7|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P8|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P9|}}}|1|0}} }}">{{{2}}}, Year {{{Year|1}}}</td>
| |
| <td>{{{Day{{{1}}}_P1}}}</td>
| |
| <td>{{{Day{{{1}}}_C1|}}}</td>
| |
| <td rowspan="{{#expr: 1 + {{#if:{{{Day{{{1}}}_P2|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P3|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P4|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P5|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P6|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P7|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P8|}}}|1|0}} + {{#if:{{{Day{{{1}}}_P9|}}}|1|0}} }}">{{#time: d/m/y | 2026-07-28 + {{#expr: ({{{Year|1}}} - 1) * 14 + {{{3}}}}} days }}</td>
| |
| </tr>
| |
| {{#if: {{{Day{{{1}}}_P2|}}} | <tr><td>{{{Day{{{1}}}_P2}}}</td><td>{{{Day{{{1}}}_C2|}}}</td></tr> }}
| |
| {{#if: {{{Day{{{1}}}_P3|}}} | <tr><td>{{{Day{{{1}}}_P3}}}</td><td>{{{Day{{{1}}}_C3|}}}</td></tr> }}
| |
| {{#if: {{{Day{{{1}}}_P4|}}} | <tr><td>{{{Day{{{1}}}_P4}}}</td><td>{{{Day{{{1}}}_C4|}}}</td></tr> }}
| |
| {{#if: {{{Day{{{1}}}_P5|}}} | <tr><td>{{{Day{{{1}}}_P5}}}</td><td>{{{Day{{{1}}}_C5|}}}</td></tr> }}
| |
| {{#if: {{{Day{{{1}}}_P6|}}} | <tr><td>{{{Day{{{1}}}_P6}}}</td><td>{{{Day{{{1}}}_C6|}}}</td></tr> }}
| |
| {{#if: {{{Day{{{1}}}_P7|}}} | <tr><td>{{{Day{{{1}}}_P7}}}</td><td>{{{Day{{{1}}}_C7|}}}</td></tr> }}
| |
| {{#if: {{{Day{{{1}}}_P8|}}} | <tr><td>{{{Day{{{1}}}_P8}}}</td><td>{{{Day{{{1}}}_C8|}}}</td></tr> }}
| |
| {{#if: {{{Day{{{1}}}_P9|}}} | <tr><td>{{{Day{{{1}}}_P9}}}</td><td>{{{Day{{{1}}}_C9|}}}</td></tr> }}
| |
| }}
| |
| }}
| |
|
| |
| <!-- DAYS 1 TO 14 -->
| |
| {{#if: {{{RangeLabel|}}} | |
| |
| {{#call: RENDER_DAY | 1 | Early January | 0 }}
| |
| {{#call: RENDER_DAY | 2 | January--February | 1 }}
| |
| {{#call: RENDER_DAY | 3 | February--March | 2 }}
| |
| {{#call: RENDER_DAY | 4 | March--April | 3 }}
| |
| {{#call: RENDER_DAY | 5 | April--May | 4 }}
| |
| {{#call: RENDER_DAY | 6 | May--June | 5 }}
| |
| {{#call: RENDER_DAY | 7 | June | 6 }}
| |
| {{#call: RENDER_DAY | 8 | June--July | 7 }}
| |
| {{#call: RENDER_DAY | 9 | July--August | 8 }}
| |
| {{#call: RENDER_DAY | 10 | August--September | 9 }}
| |
| {{#call: RENDER_DAY | 11 | September--October | 10 }}
| |
| {{#call: RENDER_DAY | 12 | October--November | 11 }}
| |
| {{#call: RENDER_DAY | 13 | November--December | 12 }}
| |
| {{#call: RENDER_DAY | 14 | Late December | 13 }}
| |
| }}
| |
|
| |
| <!-- RANGE OVERRIDE FOR CONSECUTIVE EMPTY DAYS -->
| |
| {{#if: {{{RangeLabel|}}} |
| |
| <tr>
| |
| <td>{{{RangeLabel}}}</td>
| |
| <td></td>
| |
| <td></td>
| |
| <td>{{#time: d/m/y | 2026-07-28 + {{#expr: ({{{Year|1}}} - 1) * 14 + ({{{RangeStartDay|3}}} - 1)}} days }} to {{#time: d/m/y | 2026-07-28 + {{#expr: ({{{Year|1}}} - 1) * 14 + ({{{RangeEndDay|7}}} - 1)}} days }}</td>
| |
| </tr>
| |
| }}</includeonly><noinclude>
| |
| <div style="background-color: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px; margin-bottom: 1.5em; border-radius: 4px;">
| |
| <strong style="color: #b45309;">GLOBAL NEWS TIMELINE TEMPLATE</strong>
| |
| <p style="margin: 4px 0 0 0; color: #78350f; font-size: 0.95em;">Automated news section for Global News. Supports up to 9 posts per day and auto-calculates real dates based on the <code>Year</code> parameter.</p>
| |
| </div>
| |
|
| |
| == Usage ==
| |
| <pre>
| |
| {{Global News
| |
| | Year = 6
| |
|
| |
| | Day1_P1 = ''Year 6 Begins'' | Day1_C1 =
| |
| | Day1_P2 = [[Kheta-Kedet/Who Are You|Who Are You]] | Day1_C2 = [[Kheta-Kedet]]
| |
|
| |
| | Day2_P1 = [[Republic of Calaveria/Escape|Escape of Roulette]] | Day2_C1 = [[Republic of Calaveria]]
| |
|
| |
| | RangeLabel = February--March to June, Year 6
| |
| | RangeStartDay = 3
| |
| | RangeEndDay = 7
| |
| }}
| |
| </pre>
| |
|
| |
| == TemplateData ==
| |
| <templatedata>
| |
| {
| |
| "description": "Renders the Global News timeline section for Era Nova year pages.",
| |
| "params": {
| |
| "Year": {
| |
| "label": "Lore Year",
| |
| "description": "The current lore year number (e.g. 6). Auto-calculates real-world dates.",
| |
| "type": "number",
| |
| "required": true
| |
| },
| |
| "Day1_P1": { "label": "Day 1 - Post 1", "type": "string" },
| |
| "Day1_C1": { "label": "Day 1 - Post 1 Author/Nation", "type": "string" },
| |
| "Day1_P2": { "label": "Day 1 - Post 2", "type": "string" },
| |
| "Day1_C2": { "label": "Day 1 - Post 2 Author/Nation", "type": "string" },
| |
| "RangeLabel": { "label": "Merged Range Label", "type": "string" },
| |
| "RangeStartDay": { "label": "Range Start Day (1-14)", "type": "number" },
| |
| "RangeEndDay": { "label": "Range End Day (1-14)", "type": "number" }
| |
| }
| |
| }
| |
| </templatedata>
| |
| </noinclude>
| |