oliverdavies.uk/source/_includes/talk/events.html.twig
Oliver Davies f33e9beaa4 Consistent ordering and formatting for talk events
Use a consistent format for talk events, with the most recent talk at
the top of the list with the rest in a descending order.

This removes the need to use a `reverse` filter in the events partial.
2024-01-15 19:41:05 +00:00

26 lines
513 B
Twig

{% if events %}
<section>
<h2>Events</h2>
<ul>
{% for event in events %}
<li>
{% if event.url %}
<a href="{{ event.url }}">{{ event.name }}</a>
{% else %}
{{ event.name }}
{% endif %}
{% if event.location %}
in {{ event.location }}
{% endif %}
- {{ event.date|date('F jS, Y') }}
{{ event.online ? '(online)' }}
</li>
{% endfor %}
</ul>
</section>
{% endif %}