diff options
author | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2024-04-15 17:58:28 +0200 |
---|---|---|
committer | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2024-04-15 17:58:28 +0200 |
commit | 505bb9215df6ffce68e33c1f8c87b521cb1c18ff (patch) | |
tree | 509f9164f81f88aefea3e47c0f92619656c64a7e /templates | |
parent | 47f6d3507f772f5c09a89cfb89a6bf63ca9b58a7 (diff) | |
download | cph-rust-website-main.zip |
Diffstat (limited to 'templates')
-rw-r--r-- | templates/events.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/events.html b/templates/events.html index 3fefc7a..7a75111 100644 --- a/templates/events.html +++ b/templates/events.html @@ -17,7 +17,12 @@ <section> <h2 id="{{group}}">{{ group | capitalize }}</h2> - {% for event in meetups[group] %} + {% set events_sorted = meetups[group] | sort(attribute="date") | reverse %} + + {# Reverse sorting again for upcoming events #} + {% if group == 'upcoming' %}{% set events_sorted = events_sorted | reverse %}{% endif %} + + {% for event in events_sorted %} {% set event_page = section.pages | filter(attribute="title", value=event.title) | first%} {% if event_page %} |