Phase 4 M1: Entry enrichment — location, weather, gallery, hero image
This commit is contained in:
@@ -6,17 +6,39 @@
|
||||
{% if entries|length > 0 %}
|
||||
{% for entry in entries %}
|
||||
<article class="entry-card">
|
||||
<time class="entry-date" datetime="{{ entry.date|date('Y-m-d') }}">
|
||||
{{ entry.date|date('d M Y') }}
|
||||
</time>
|
||||
{% set hero = null %}
|
||||
{% if entry.header.hero_image and entry.media[entry.header.hero_image] is defined %}
|
||||
{% set hero = entry.media[entry.header.hero_image] %}
|
||||
{% elseif entry.media.images|length > 0 %}
|
||||
{% set hero = entry.media.images|first %}
|
||||
{% endif %}
|
||||
|
||||
{% if hero %}
|
||||
<div class="entry-thumb">
|
||||
<a href="{{ entry.url }}">
|
||||
<img src="{{ hero.cropResize(680, 383).url }}" alt="{{ entry.title }}" loading="lazy">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="entry-card-meta">
|
||||
<time class="entry-date" datetime="{{ entry.date|date('Y-m-d') }}">
|
||||
{{ entry.date|date('d M Y') }}
|
||||
</time>
|
||||
{% if entry.header.location_city or entry.header.location_country %}
|
||||
<span class="entry-location entry-location--card">
|
||||
📍
|
||||
{% if entry.header.location_city %}{{ entry.header.location_city|slice(0,25) }}{% endif %}
|
||||
{% if entry.header.location_city and entry.header.location_country %}, {% endif %}
|
||||
{% if entry.header.location_country %}{{ entry.header.location_country }}{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<h2 class="entry-title">
|
||||
<a href="{{ entry.url }}">{{ entry.title }}</a>
|
||||
</h2>
|
||||
{% if entry.header.hero_image %}
|
||||
<div class="entry-thumb">
|
||||
<img src="{{ entry.media[entry.header.hero_image].url }}" alt="{{ entry.title }}">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="entry-excerpt">
|
||||
{{ entry.summary }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user