Template:News Header: Difference between revisions

From aquila
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:
|Page_Name={{FULLPAGENAME}}
|Page_Name={{FULLPAGENAME}}
|Type={{{Type|Character News}}}
|Type={{{Type|Character News}}}
|Subheading={{{Subheading|}}}
|RealDate={{{RealDate|}}}
|RealDate={{{RealDate|}}}
|Author={{{Author|{{{Publisher|{{{Agency|{{{Publication|}}}}}}}}}}}
|Author={{{Author|{{{Publisher|{{{Agency|{{{Publication|}}}}}}}}}}}
Line 28: Line 27:
}}<!--
}}<!--


--><div style="border: 1px solid #1a1a1a; background-color: #f8f9fa; padding: 18px 20px; margin-bottom: 1.5em; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
--><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;">


<!-- Main Article Title Inside Box -->
<!-- Top Header / Article Title -->
<div style="font-size: 180%; font-family: 'Georgia', serif; font-weight: normal; margin-bottom: 12px; border-bottom: 1px solid #c8ccd1; padding-bottom: 8px; line-height: 1.2; color: #202122;">{{#titleparts:{{FULLPAGENAME}}|1|-1}}</div>
<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 Section -->
<!-- Split Flex Container matching Player Profile style -->
<div style="font-size: 92%; color: #54595d; line-height: 1.6;"><b>In-universe date:</b> Era Nova, {{#switch: {{#expr: 1 + ( floor( ({{#time:U|{{{RealDate}}}}} - {{#time:U|2026-07-28}}) / 86400) mod 14 ) }}
<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 )}}]]<br>
}}, [[: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>
<b>Real-world date:</b> {{{RealDate}}}<br>
</tr>
<b>{{#if: {{{Author|}}} | Author | Publisher }}:</b> {{#if: {{{Author|}}} | [[{{{Author}}}]] | {{{Publisher|{{{Agency|{{{Publication|Global News}}}}}}}}} }}
<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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
News Category TypeType

Defines the main category. Suggested values: Character News, Global News, Domestic News

Suggested values
Character News Global News Domestic News
Default
Character News
Stringrequired
Real-world date (REQUIRED)RealDate

MUST BE YYYY-MM-DD. Do NOT use slashes!

Example
2026-09-15
Stringrequired
Author (Character)Author

Character author name (creates an author category and wiki link). Leave blank if using a news Publisher/Agency.

Page namesuggested
Publisher / AgencyPublisher

Name of the news outlet (use this instead of Author for Global/Domestic news).

Stringsuggested
Excerpt / Summary / IntroExcerpt

Optional introductory text or hook displayed in the right-hand column box.

Stringsuggested