Template:PatchHighlights: Difference between revisions
Template page
More actions
Created page with "<div style="display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; grid-auto-rows:auto; align-items:start; width:100%;"> {{#ask: Namespace::Update Publish date::+ | sort=Publish date | order=desc | limit=3 | ?Publish date | ?Patch blurb | format=template | template=PatchHighlights | named args=yes }} </div> <includeonly> <div style="text-align:left; padding:1rem 1.5rem 0.75rem;"> <div style="font-size:1.4em; font-weight:700; line-height:1.2; marg..." |
No edit summary |
||
| Line 1: | Line 1: | ||
{{#if:{{{1|}}}| | |||
<!-- Card mode (called by SMW #ask with parameters) --> | |||
<div style="text-align:left; padding:1rem 1.5rem 0.75rem;"> | |||
<div style="font-size:1.4em; font-weight:700; line-height:1.2; margin:-0.2em 0 0.3em 0;"> | |||
[[{{{1}}}|{{#titleparts:{{{1}}}|1|2|:}}]] | |||
</div> | |||
<div style="margin:.1em 0; font-size:.85em; font-style:italic; color:var(--text-color);"> | |||
{{{Publish date}}} | |||
</div> | |||
{{#if:{{{Patch blurb|}}}|<p style="font-size:.9em; line-height:1.75em; color:var(--text-color); margin:.3em 0 0 0;">{{{Patch blurb}}}</p>|}} | |||
</div> | |||
| | |||
<!-- Grid mode (no params) --> | |||
<div style="display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; grid-auto-rows:auto; align-items:start; width:100%;"> | <div style="display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; grid-auto-rows:auto; align-items:start; width:100%;"> | ||
{{#ask: | {{#ask: | ||
| Line 13: | Line 26: | ||
}} | }} | ||
</div> | </div> | ||
}} | |||
<noinclude> | <noinclude> | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Displays the three most recent Update: pages using SMW. | "description": "Displays the three most recent Update: pages using Semantic MediaWiki. When called without parameters, it renders a 3-column grid populated by an SMW query. When SMW calls it with parameters, it renders one card showing the page title (without the Update: prefix), the Publish date, and an optional Patch blurb.", | ||
"params": { | "params": { | ||
"1": { "label": "Page", "description": " | "1": { "label": "Page", "description": "Set automatically by SMW when rendering each card.", "type": "wiki-page-name", "required": false }, | ||
"Publish date": { "label": "Publish date", "description": " | "Publish date": { "label": "Publish date", "description": "SMW printout of the date (Property:Publish date).", "type": "string", "required": false }, | ||
"Patch blurb": { "label": "Patch blurb", "description": "Optional | "Patch blurb": { "label": "Patch blurb", "description": "Optional one-line summary set on the update page with [[Patch blurb::...]].", "type": "string", "required": false } | ||
} | } | ||
} | } | ||
Revision as of 19:01, 1 October 2025
Displays the three most recent Update: pages using Semantic MediaWiki. When called without parameters, it renders a 3-column grid populated by an SMW query. When SMW calls it with parameters, it renders one card showing the page title (without the Update: prefix), the Publish date, and an optional Patch blurb.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page | 1 | Set automatically by SMW when rendering each card. | Page name | optional |
| Publish date | Publish date | SMW printout of the date (Property:Publish date). | String | optional |
| Patch blurb | Patch blurb | Optional one-line summary set on the update page with [[Patch blurb::...]]. | String | optional |