Experiment with a different presentation layout

This commit is contained in:
Oliver Davies 2025-03-21 00:26:41 +00:00
parent f9790b6080
commit 8b721e63fb
5 changed files with 26441 additions and 19 deletions

View file

@ -0,0 +1,44 @@
<section>
<h2>Events</h2>
<table>
<thead>
<th>Event name</th>
<th>Date</th>
<th>Location</th>
<th>Links</th>
</thead>
<tbody>
{% for event in events|sort((a, b) => b.date <=> a.date) %}
<tr>
<td>{{ event.name }}</td>
<td><time datetime="{{ event.date|date('Y-m-d') }}">{{ event.date|date('jS F Y') }}</time></td>
<td>
{% if event.online %}
Online
{% elseif event.location %}
{{ event.location }}
{% endif %}
</td>
<td>
{% if event.urls %}
<ul>
{% for key, link in event.urls %}
<li>
<a href="{{ link }}" title="{% spaceless %}
{{ key == 'code' ? 'View the example code from %s.'|format(event.name) }}
{{ key == 'slides' ? 'View the slides from %s.'|format(event.name) }}
{{ key == 'website' ? 'View the website for %s.'|format(event.name) }}
{% endspaceless %}">
{{- key|capitalize -}}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>