Template:News Header: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 4: | Line 4: | ||
|Page_Name={{FULLPAGENAME}} | |Page_Name={{FULLPAGENAME}} | ||
|Type={{{Type|Character News}}} | |Type={{{Type|Character News}}} | ||
|RealDate={{{RealDate|}}} | |RealDate={{{RealDate|}}} | ||
|Author={{{Author|{{{Publisher|{{{Agency|{{{Publication|}}}}}}}}}}} | |Author={{{Author|{{{Publisher|{{{Agency|{{{Publication|}}}}}}}}}}} | ||
| Line 28: | Line 27: | ||
}}<!-- | }}<!-- | ||
--><div style="border: 1px solid # | --><div style="background: #ffffff; border: 1px solid #d1d5db; border-radius: 8px; padding: 1.5em; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 2em;"> | ||
<!-- | <!-- Top Header / Article Title --> | ||
< | <h2 style="border-bottom: 2px solid #e0a96d; color: #0b132b; margin-top: 0; padding-bottom: 0.4em; font-family: 'Georgia', serif;">{{#titleparts:{{FULLPAGENAME}}|1|-1}}</h2> | ||
<!-- Metadata | <!-- Split Flex Container matching Player Profile style --> | ||
<div style=" | <div style="display: flex; flex-wrap: wrap; gap: 2em; align-items: flex-start; margin-top: 1.2em;"> | ||
<!-- Left Column: News Metadata Stats Table --> | |||
<div style="flex: 1; min-width: 280px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0.8em; font-size: 0.95em; line-height: 1.5; color: #374151;"> | |||
<table style="width: 100%; border-collapse: collapse;"> | |||
<tr> | |||
<td style="padding: 0.3em 0.5em; font-weight: bold; width: 45%; border-bottom: 1px solid #e2e8f0;">In-universe date</td> | |||
<td style="padding: 0.3em 0.5em; border-bottom: 1px solid #e2e8f0;">Era Nova, {{#switch: {{#expr: 1 + ( floor( ({{#time:U|{{{RealDate}}}}} - {{#time:U|2026-07-28}}) / 86400) mod 14 ) }} | |||
| 1 = Early January | | 1 = Early January | ||
| 2 = January--February | | 2 = January--February | ||
| Line 50: | Line 57: | ||
| 14 = Late December | | 14 = Late December | ||
| #default = Early January | | #default = Early January | ||
}}, [[:Category:Era Nova, Year {{#expr: 1 + floor( ({{#time:U|{{{RealDate}}}}} - {{#time:U|2026-07-28}}) / 1209600 )}}|Year {{#expr: 1 + floor( ({{#time:U|{{{RealDate}}}}} - {{#time:U|2026-07-28}}) / 1209600 )}}]]< | }}, [[:Category:Era Nova, Year {{#expr: 1 + floor( ({{#time:U|{{{RealDate}}}}} - {{#time:U|2026-07-28}}) / 1209600 )}}|Year {{#expr: 1 + floor( ({{#time:U|{{{RealDate}}}}} - {{#time:U|2026-07-28}}) / 1209600 )}}]]</td> | ||
< | </tr> | ||
< | <tr> | ||
</div></div> | <td style="padding: 0.3em 0.5em; font-weight: bold; border-bottom: 1px solid #e2e8f0;">Real-world date</td> | ||
<td style="padding: 0.3em 0.5em; border-bottom: 1px solid #e2e8f0;"><span style="font-family: monospace; font-size: 0.9em;">{{{RealDate}}}</span></td> | |||
</tr> | |||
<tr> | |||
<td style="padding: 0.3em 0.5em; font-weight: bold; border-bottom: 1px solid #e2e8f0;">{{#if: {{{Author|}}} | Author | Publisher }}</td> | |||
<td style="padding: 0.3em 0.5em; border-bottom: 1px solid #e2e8f0;">{{#if: {{{Author|}}} | '''[[{{{Author}}}]]''' | {{{Publisher|{{{Agency|{{{Publication|Global News}}}}}}}}} }}</td> | |||
</tr> | |||
<tr> | |||
<td style="padding: 0.3em 0.5em; font-weight: bold;">Category Type</td> | |||
<td style="padding: 0.3em 0.5em;">{{{Type|Character News}}}</td> | |||
</tr> | |||
</table> | |||
</div> | |||
<!-- Right Column: Optional Excerpt / Summary Box (or Intro note) --> | |||
<div style="flex: 1.5; min-width: 280px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 1.2em; display: flex; flex-direction: column; justify-content: center; color: #4b5563; line-height: 1.6;"> | |||
{{{Intro|{{{Summary|{{{Excerpt|This post has no summary excerpt provided.}}}}}}}}} | |||
</div> | |||
</div> | |||
</div> | |||
<!-- AUTOMATED CATEGORIZATION WITH SWITCH LOGIC --> | <!-- AUTOMATED CATEGORIZATION WITH SWITCH LOGIC --> | ||
| Line 81: | Line 110: | ||
| RealDate = 2026-09-15 | | RealDate = 2026-09-15 | ||
| Author = Basil Blight <!-- Use 'Author' for character news, or 'Publisher'/'Agency' for news outlets --> | | Author = Basil Blight <!-- Use 'Author' for character news, or 'Publisher'/'Agency' for news outlets --> | ||
| Excerpt = Optional short hook or summary text for the right-hand box. | |||
}} | }} | ||
| Line 88: | Line 118: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Universal automated news and dispatch header for Project Aquila.", | "description": "Universal automated news and dispatch header for Project Aquila, styled after the Player Profile template.", | ||
"params": { | "params": { | ||
"Type": { | "Type": { | ||
| Line 120: | Line 150: | ||
"label": "Publisher / Agency", | "label": "Publisher / Agency", | ||
"description": "Name of the news outlet (use this instead of Author for Global/Domestic news).", | "description": "Name of the news outlet (use this instead of Author for Global/Domestic news).", | ||
"type": "string", | |||
"required": false, | |||
"suggested": true | |||
}, | |||
"Excerpt": { | |||
"label": "Excerpt / Summary / Intro", | |||
"description": "Optional introductory text or hook displayed in the right-hand column box.", | |||
"type": "string", | "type": "string", | ||
"required": false, | "required": false, | ||
Revision as of 20:13, 5 October 2026
CRITICAL DATE FORMAT WARNING
When using the RealDate parameter, you MUST write it in strict YYYY-MM-DD format (e.g., 2026-09-15).
DO NOT use slashes or short-hand like 15/09/26, or the wiki math engine will crash with an error!
Usage
{{News Header
| Type = Character News <!-- Options: Character News, Global News, Domestic News -->
| RealDate = 2026-09-15
| Author = Basil Blight <!-- Use 'Author' for character news, or 'Publisher'/'Agency' for news outlets -->
| Excerpt = Optional short hook or summary text for the right-hand box.
}}
== The Story Begins ==
Write your raw text, add multiple images, use custom headers, or layout the page however you want below the header!
Universal automated news and dispatch header for Project Aquila, styled after the Player Profile template.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| News Category Type | Type | Defines the main category. Suggested values: Character News, Global News, Domestic News
| String | required |
| Real-world date (REQUIRED) | RealDate | MUST BE YYYY-MM-DD. Do NOT use slashes!
| String | required |
| Author (Character) | Author | Character author name (creates an author category and wiki link). Leave blank if using a news Publisher/Agency. | Page name | suggested |
| Publisher / Agency | Publisher | Name of the news outlet (use this instead of Author for Global/Domestic news). | String | suggested |
| Excerpt / Summary / Intro | Excerpt | Optional introductory text or hook displayed in the right-hand column box. | String | suggested |