Toggle menu
84
103
34
3.2K
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:Home/FeaturedRegionCard: Difference between revisions

Template page
Undo revision 2023 by Eloise Zomia (talk)
Tag: Undo
No edit summary
Tag: Reverted
Line 1: Line 1:
<templatestyles src="Template:Home/FeaturedRegionCard/styles.css" />
<includeonly>
 
<templatestyles src="Template:Infobox Growing Region/styles.css" />
<div class="fa-card">
{| class="infobox lw-infobox lw-infobox--growing-region"
<div class="fa-media">
|-
{{#if:{{{HeroImage|}}}|
! colspan="2" class="lw-infobox__title" | {{{region_name|{{PAGENAME}}}}}
{{#ifexist:File:{{{HeroImage}}}|
|-
<span class="fa-img">[[File:{{{HeroImage}}}|link=|alt={{{HeroAlt|{{{RegionName|{{{Page|Untitled region}}}}}}}}}]]</span>
{{#if:{{{other_name|}}}|
| <span class="fa-img fa-img--placeholder">No image</span>}}
! colspan="2" class="lw-infobox__subtitle" {{!}} {{{other_name}}}
| <span class="fa-img fa-img--placeholder">No image</span>}}
{{!}}-
</div>
}}
 
{{#if:{{{image|}}}|
  <div class="fa-body">
{{!}} colspan="2" class="lw-infobox__media" {{!}} [[File:{{{image}}}|320px|{{{image_caption|View of {{{region_name|{{PAGENAME}}}}}}}}]]
 
{{!}}-
  <!-- Title -->
{{#if:{{{image_caption|}}}|
  <h3 class="fa-title">
{{!}} colspan="2" class="lw-infobox__caption" {{!}} {{{image_caption}}}
    {{#ifexist:{{{Page|}}}|
{{!}}-
      [[{{{Page}}}|{{{RegionName|{{{Page}}}}}}]]
}}
    | {{{RegionName|Untitled region}}} }}
}}
  </h3>
{{#if:{{{show_map|}}}|
 
{{!}} colspan="2" class="lw-infobox__map-container" {{!}} <div class="lw-infobox__map lw-map" data-smw-query="[[Has growing region::{{PAGENAME}}]]{{!}}?Has GPS coordinates{{!}}?Has descriptive name{{!}}?Has conservation priority{{!}}?Has accession ID"></div><div class="lw-infobox__map-expand" title="Expand map">⛶</div>
  <!-- Path/lineage under title -->
{{!}}-
  {{#if:{{{Path|{{{GPName|}}}}}}|
}}
    <p class="fa-kicker"><span class="k-item">{{{Path|{{{GPName|}}}}}}</span></p>
|-
  }}
! class="lw-infobox__label" | Location
 
| class="lw-infobox__value" | {{{location|{{{country|}}}}}}
  <!-- One-line pitch: only render if provided -->
|-
  {{#if:{{{Hook|}}}|<p class="fa-hook">{{{Hook}}}</p>}}
{{#if:{{{coordinates|}}}|
 
! class="lw-infobox__label" {{!}} Coordinates
  <!-- Footer: status + growing area + accessions + CTA -->
{{!}} class="lw-infobox__value" {{!}} {{{coordinates}}}
  <div class="fa-foot">
{{!}}-
    <p class="fa-statusline">
}}
      <!-- Conservation status (colored) -->
{{#if:{{{gene_pool|}}}|
      <span class="status-pill sp--{{lc:{{{Status|unknown}}}}}"
! class="lw-infobox__label" {{!}} Gene Pool
            aria-label="Conservation status: {{ucfirst:{{lc:{{{Status|Unknown}}}}}}}">
{{!}} class="lw-infobox__value" {{!}} {{{gene_pool}}}
        <span class="pill-dot"></span>
{{!}}-
        <span class="pill-text">{{ucfirst:{{lc:{{{Status|Unknown}}}}}}}</span>
}}
      </span>
{{#if:{{{regional_complex|}}}|
 
! class="lw-infobox__label" {{!}} Regional Complex
      <!-- Growing areas count -->
{{!}} class="lw-infobox__value" {{!}} {{{regional_complex}}}
      {{#if:{{{Areas|}}}|<span class="pill pill--area" aria-label="Growing areas"><span class="pill-num">{{{Areas}}}</span><span class="pill-label">areas</span></span>}}
{{!}}-
        </span>
}}
      </span>
{{#if:{{{country|}}}|
 
! class="lw-infobox__label" {{!}} Country
      <!-- Accessions (neutral number + label) -->
{{!}} class="lw-infobox__value" {{!}} {{{country}}}
      {{#if:{{{Accessions|}}}|
{{!}}-
        <span class="pill pill--access" aria-label="Documented accessions">
}}
          <span class="pill-num">{{{Accessions}}}</span>
{{#if:{{{provinces|}}}|
          <span class="pill-label">accessions</span>
! class="lw-infobox__label" {{!}} Provinces/States
        </span>
{{!}} class="lw-infobox__value" {{!}} {{{provinces}}}
      }}
{{!}}-
    </p>
}}
 
{{#if:{{{elevation_range|}}}|
    <div class="fa-foot-sep" role="presentation"></div>
! class="lw-infobox__label" {{!}} Elevation Range
 
{{!}} class="lw-infobox__value" {{!}} {{{elevation_range}}}
    <p class="fa-cta">
{{!}}-
      {{#ifexist:{{{Page|}}}|
}}
        [[{{{Page}}}|→ View region]]
{{#if:{{{area_extent|}}}|
      | <span class="fa-missing">Profile coming soon</span> }}
! class="lw-infobox__label" {{!}} Area
    </p>
{{!}} class="lw-infobox__value" {{!}} {{{area_extent}}}
  </div>
{{!}}-
</div>
}}
 
{{#if:{{{climate|}}}|
</div>
! class="lw-infobox__label" {{!}} Climate
{{!}} class="lw-infobox__value" {{!}} {{{climate}}}
{{!}}-
}}
{{#if:{{{primary_river|}}}|
! class="lw-infobox__label" {{!}} Primary Rivers
{{!}} class="lw-infobox__value" {{!}} {{{primary_river}}}
{{!}}-
}}
{{#if:{{{primary_mountains|}}}|
! class="lw-infobox__label" {{!}} Primary Mountains
{{!}} class="lw-infobox__value" {{!}} {{{primary_mountains}}}
{{!}}-
}}
{{#if:{{{status|}}}|
! class="lw-infobox__label" {{!}} Conservation Status
{{!}} class="lw-infobox__value lw-infobox__status" {{!}} {{{status}}}
{{!}}-
}}
|}
<!-- Semantic properties (single-value) -->
[[Category:Growing Regions]]
{{#set:
|Has region name={{{region_name|}}}
|Has alternate name={{{other_name|}}}
|Has coordinates={{{coordinates|}}}
|Has gene pool={{{gene_pool|}}}
|Has regional complex={{{regional_complex|}}}
|Has elevation range={{{elevation_range|}}}
|Has area extent={{{area_extent|}}}
|Has climate={{{climate|}}}
|Has conservation status={{{status|}}}
}}
<!-- Semantic properties (multi-value) -->
{{#arraymap:{{{country|}}}|,|x|{{#set:|Has country=x}}|}}
{{#arraymap:{{{provinces|}}}|,|x|{{#set:|Has province=x}}|}}
{{#arraymap:{{{primary_river|}}}|,|x|{{#set:|Has primary river=x}}|}}
{{#arraymap:{{{primary_mountains|}}}|,|x|{{#set:|Has primary mountains=x}}|}}
</includeonly>
<noinclude>
Documentation goes here.
</noinclude>

Revision as of 19:15, 19 January 2026


Documentation goes here.