Toggle menu
83
56
34
2.9K
Landrace.Wiki - The Landrace Cannabis Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:NewsItem: Difference between revisions

Template page
Undo revision 2587 by Eloise Zomia (talk)
Tag: Undo
Undo revision 2586 by Eloise Zomia (talk)
Tag: Undo
Line 1: Line 1:
<includeonly><templatestyles src="Template:NewsItem/styles.css" />
<includeonly>
<div class="news-card news-card--{{{category|}}}">
<templatestyles src="Template:NewsItem/styles.css" />
  <div class="news-card__header">
 
    <div class="news-card__date">{{{date|}}}</div>
<div class="news-card news-card--{{lc:{{{category|policy}}}}}">
    <div class="news-card__badges">
<div class="news-card__header">
      {{#if:{{{part_of_campaign|}}}|<div class="news-card__campaign-badge">{{{part_of_campaign}}}</div>}}
<div class="news-card__date">{{#time:j F Y|{{{date|}}}}}</div>
      <div class="news-card__category-badge news-card__category-badge--{{{category|}}}">{{{category|}}}</div>
<div class="news-card__badges">
    </div>
{{#if:{{{part_of_campaign|}}}|<div class="news-card__campaign-badge">{{{part_of_campaign}}}</div>}}
  </div>
<div class="news-card__category-badge news-card__category-badge--{{lc:{{{category|policy}}}}}">{{{category|Policy}}}</div>
 
  <div class="news-card__location">
    {{#if:{{{country|}}}|{{{country}}}}}{{#if:{{{admin1|}}}| · {{{admin1}}}}}{{#if:{{{admin2|}}}| · {{{admin2}}}}}{{#if:{{{locality|}}}| · {{{locality}}}}}{{#if:{{{growing_region|}}}| ({{{growing_region}}})}}
  </div>
 
  <h3 class="news-card__title">{{{title|}}}</h3>
 
  <div class="news-card__summary">{{{summary|}}}</div>
 
  {{#if:{{{agency|}}}|
  <div class="news-card__enforcement">
    <div class="news-card__enforcement-label">Agency</div>
    <div class="news-card__enforcement-value">{{{agency}}}</div>
  </div>
  }}
 
  {{#if:{{{hectares|}}}|{{{plants|}}}|
  <div class="news-card__metrics">
    {{#if:{{{hectares|}}}|<div class="news-card__metric"><span class="news-card__metric-icon">📏</span><span class="news-card__metric-value">{{{hectares}}} hectares</span></div>}}
    {{#if:{{{plants|}}}|<div class="news-card__metric"><span class="news-card__metric-icon">🌱</span><span class="news-card__metric-value">{{{plants}}} plants</span></div>}}
  </div>
  }}
 
  <div class="news-card__source">
    <span class="news-card__source-label">Source:</span> {{{source|}}}
  </div>
</div>
</div>
</includeonly><noinclude>
</div>
{{Documentation}}
 
</noinclude>
{{#if:{{{country|}}}{{{admin1|}}}{{{admin2|}}}{{{locality|}}}{{{growing_region|}}}|
<div class="news-card__location">
{{#if:{{{country|}}}|{{{country}}}}}{{#if:{{{country|}}}{{{admin1|}}}|  ·  }}{{{admin1|}}}{{#if:{{{admin1|}}}{{{admin2|}}}|  ·  }}{{{admin2|}}}{{#if:{{{admin2|}}}{{{locality|}}}|  ·  }}{{{locality|}}}{{#if:{{{growing_region|}}}|  ·  ({{{growing_region}}})}}
</div>
}}
 
<h3 class="news-card__title">{{{title|{{PAGENAME}}}}}</h3>
 
{{#if:{{{summary|}}}|<div class="news-card__summary">{{{summary}}}</div>}}
 
{{#ifeq:{{lc:{{{category|}}}}}|enforcement|
{{#if:{{{agency|}}}{{{hectares|}}}{{{plants|}}}|
<div class="news-card__enforcement-data">
{{#if:{{{agency|}}}|<span class="enforcement-metric enforcement-metric--agency">🚔 {{{agency}}}</span>}}
{{#if:{{{hectares|}}}|<span class="enforcement-metric enforcement-metric--scale">📏 {{{hectares}}} ha</span>}}
{{#if:{{{plants|}}}|<span class="enforcement-metric enforcement-metric--scale">🌱 {{formatnum:{{{plants}}}}} plants</span>}}
</div>
}}
}}
 
{{#if:{{{source|}}}|<div class="news-card__source">Source: {{{source}}}</div>}}
</div>
 
[[Category:News Item]]
 
<div style="display:none;">
[[Has event date::{{{date|}}}]]
[[Has event category::{{{category|}}}]]
[[Has event headline::{{{title|{{PAGENAME}}}}}]]
[[Has event summary::{{{summary|}}}]]
[[Has source URL::{{{source|}}}]]
 
{{#if:{{{part_of_campaign|}}}|[[Has part of campaign::{{{part_of_campaign|}}}]]}}
{{#if:{{{country|}}}|[[Has country::{{{country|}}}]]}}
{{#if:{{{admin1|}}}|{{#arraymap:{{{admin1|}}}|;|@@|[[Has admin subdivision 1::{{trim:@@}}]]}}}}
{{#if:{{{admin2|}}}|{{#arraymap:{{{admin2|}}}|;|@@|[[Has admin subdivision 2::{{trim:@@}}]]}}}}
{{#if:{{{locality|}}}|[[Has locality::{{{locality|}}}]]}}
{{#if:{{{coordinates|}}}|[[Has event coordinates::{{{coordinates|}}}]]}}
{{#if:{{{growing_region|}}}|[[Has growing region::{{{growing_region|}}}]]}}
{{#if:{{{growing_area|}}}|[[Has growing area::{{{growing_area|}}}]]}}
 
{{#if:{{{agency|}}}|[[Has agency::{{{agency|}}}]]}}
{{#if:{{{hectares|}}}|[[Has hectares destroyed::{{{hectares|}}}]]}}
{{#if:{{{plants|}}}|[[Has plants eradicated::{{{plants|}}}]]}}
 
{{#if:{{{plot1_coordinates|}}}|{{#subobject:Eradication plot 1|Has eradication plot coordinates={{{plot1_coordinates|}}}|Has eradication plot label={{{plot1_label|}}}|Has eradication plot hectares={{{plot1_hectares|}}}|Has eradication plot plants={{{plot1_plants|}}}}}}
{{#if:{{{plot2_coordinates|}}}|{{#subobject:Eradication plot 2|Has eradication plot coordinates={{{plot2_coordinates|}}}|Has eradication plot label={{{plot2_label|}}}|Has eradication plot hectares={{{plot2_hectares|}}}|Has eradication plot plants={{{plot2_plants|}}}}}}
{{#if:{{{plot3_coordinates|}}}|{{#subobject:Eradication plot 3|Has eradication plot coordinates={{{plot3_coordinates|}}}|Has eradication plot label={{{plot3_label|}}}|Has eradication plot hectares={{{plot3_hectares|}}}|Has eradication plot plants={{{plot3_plants|}}}}}}
{{#if:{{{plot4_coordinates|}}}|{{#subobject:Eradication plot 4|Has eradication plot coordinates={{{plot4_coordinates|}}}|Has eradication plot label={{{plot4_label|}}}|Has eradication plot hectares={{{plot4_hectares|}}}|Has eradication plot plants={{{plot4_plants|}}}}}}
{{#if:{{{plot5_coordinates|}}}|{{#subobject:Eradication plot 5|Has eradication plot coordinates={{{plot5_coordinates|}}}|Has eradication plot label={{{plot5_label|}}}|Has eradication plot hectares={{{plot5_hectares|}}}|Has eradication plot plants={{{plot5_plants|}}}}}}
{{#if:{{{plot6_coordinates|}}}|{{#subobject:Eradication plot 6|Has eradication plot coordinates={{{plot6_coordinates|}}}|Has eradication plot label={{{plot6_label|}}}|Has eradication plot hectares={{{plot6_hectares|}}}|Has eradication plot plants={{{plot6_plants|}}}}}}
{{#if:{{{plot7_coordinates|}}}|{{#subobject:Eradication plot 7|Has eradication plot coordinates={{{plot7_coordinates|}}}|Has eradication plot label={{{plot7_label|}}}|Has eradication plot hectares={{{plot7_hectares|}}}|Has eradication plot plants={{{plot7_plants|}}}}}}
{{#if:{{{plot8_coordinates|}}}|{{#subobject:Eradication plot 8|Has eradication plot coordinates={{{plot8_coordinates|}}}|Has eradication plot label={{{plot8_label|}}}|Has eradication plot hectares={{{plot8_hectares|}}}|Has eradication plot plants={{{plot8_plants|}}}}}}
{{#if:{{{plot9_coordinates|}}}|{{#subobject:Eradication plot 9|Has eradication plot coordinates={{{plot9_coordinates|}}}|Has eradication plot label={{{plot9_label|}}}|Has eradication plot hectares={{{plot9_hectares|}}}|Has eradication plot plants={{{plot9_plants|}}}}}}
{{#if:{{{plot10_coordinates|}}}|{{#subobject:Eradication plot 10|Has eradication plot coordinates={{{plot10_coordinates|}}}|Has eradication plot label={{{plot10_label|}}}|Has eradication plot hectares={{{plot10_hectares|}}}|Has eradication plot plants={{{plot10_plants|}}}}}}
</div>
 
</includeonly>

Revision as of 09:22, 18 January 2026