53 lines
2.0 KiB
Twig
53 lines
2.0 KiB
Twig
{% extends 'default.html.twig' %}
|
|
|
|
{% block content %}
|
|
<div class="feed">
|
|
{% set entries = page.children %}
|
|
{% if entries|length > 0 %}
|
|
{% for entry in entries %}
|
|
<article class="entry-card">
|
|
{% 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>
|
|
|
|
<div class="entry-excerpt">
|
|
{{ entry.summary }}
|
|
</div>
|
|
<a class="entry-read-more" href="{{ entry.url }}">Read more →</a>
|
|
</article>
|
|
{% endfor %}
|
|
{% else %}
|
|
<p class="feed-empty">No entries yet. The journey is about to begin.</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|