diff options
-rw-r--r-- | events.toml | 20 | ||||
-rw-r--r-- | templates/events.html | 7 |
2 files changed, 16 insertions, 11 deletions
diff --git a/events.toml b/events.toml index f5032d4..925e5a7 100644 --- a/events.toml +++ b/events.toml @@ -1,4 +1,14 @@ [[upcoming]] +title = "Meetup #46" +date = 2024-04-25 18:00:00+02:00 +venue = "Nine A/S" +address = "Kongens Nytorv 18, 1050 København" +url = "" +content = """ +TBA +""" + +[[upcoming]] title = "Hacknight #4" date = 2024-04-16 17:00:00+02:00 venue = "KEA" @@ -21,16 +31,6 @@ https://github.com/dtolnay/proc-macro-workshop</p> We kindly remind you to cancel your RSVP a day before if you can't make it so that others may attend.</p> """ -[[upcoming]] -title = "Meetup #46" -date = 2024-04-25 18:00:00+02:00 -venue = "Nine A/S" -address = "Kongens Nytorv 18, 1050 København" -url = "" -content = """ -TBA -""" - [[recent]] title = "Meetup #45" date = 2024-03-27 18:00:00+01:00 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 %} |