Template:NewsItem: Difference between revisions
Template page
More actions
Eloise Zomia (talk | contribs) No edit summary |
Eloise Zomia (talk | contribs) No edit summary |
||
| Line 9: | Line 9: | ||
[[Has parent story::{{{parent_story|}}}]] | [[Has parent story::{{{parent_story|}}}]] | ||
[[Has event status::{{{status|Single-day}}}]] | [[Has event status::{{{status|Single-day}}}]] | ||
</div> | </div><templatestyles src="Template:NewsItem/styles.css" /> | ||
< | <article class="news-card news-card--{{lc:{{{category|policy}}}}}"> | ||
< | <header class="news-card__header"> | ||
< | <time class="news-card__date">{{#time:j F Y|{{{date}}}}}</time> | ||
{{#if:{{{region_label|}}}|< | <div class="news-card__category-badge news-card__category-badge--{{lc:{{{category|policy}}}}}}"> | ||
{{{category|Policy}}} | |||
< | </div> | ||
{{#if:{{{summary|}}}|<div class=" | </header> | ||
{{#if:{{{links|}}}|<div class=" | |||
</ | {{#if:{{{region_label|}}}|<div class="news-card__region">{{{region_label}}}</div>}} | ||
<h1 class="news-card__title">{{{title}}}</h1> | |||
{{#if:{{{summary|}}}| | |||
<div class="news-card__summary">{{{summary}}}</div> | |||
}} | |||
<footer class="news-card__footer"> | |||
{{#if:{{{links|}}}|<div class="news-card__links">{{{links}}}</div>}} | |||
</footer> | |||
</article> | |||
</includeonly> | </includeonly> | ||
<noinclude> | |||
{{Documentation}} | |||
[[Category:News Templates]] | |||
</noinclude> | |||
Revision as of 02:01, 23 November 2025
This is a documentation subpage for NewsItem. It contains usage information, categories, and other content that is not part of the original template.
Usage
{{Reflist}}
This template formats the reference list at the bottom of articles. It provides consistent styling and optional multi-column layouts for pages with many references.
Parameters
| Parameter | Description | Default |
|---|---|---|
colwidth |
Column width in em units. References will flow into multiple columns on wide screens. Use full to force single column. |
(none - single column) |
group |
Reference group name (for <refgroup="name">) |
(none) |
refs |
Defined references (for list-defined references) | (none) |
Examples
Basic usage
== References ==
{{Reflist}}
Multi-column (recommended for 10+ references)
== References ==
{{Reflist|colwidth=30}}
With reference group
== Notes ==
{{Reflist|group=note}}
== References ==
{{Reflist}}
List-defined references
== References ==
{{Reflist|refs=
<ref name="smith2020">Smith, J. (2020). ''Cannabis Genetics''. Publisher.</ref>
<ref name="jones2019">Jones, A. (2019). ''Himalayan Landraces''. Publisher.</ref>
}}
Styling
The template uses lw-reflist CSS classes which:
- Match the landrace.wiki visual style (green accents)
- Support dark mode via Citizen skin
- Collapse to single column on mobile devices
- Prevent orphaned reference entries when using columns