From 4b79356fb3be51d65b2674add0bc2bfb0a3feb46 Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Sun, 19 Feb 2023 07:50:30 +0100 Subject: [PATCH] Test Events --- events.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/events.md b/events.md index 694244f..b2ddb76 100644 --- a/events.md +++ b/events.md @@ -1,11 +1,22 @@ --- -title: "Zukünftige Veranstaltungen" +title: "Veranstaltungen" layout: default --- -{% assign events = site.events %} +{% assign events = site.events | sort: "date", "first" | where_exp:"event","event.date >= site.time" %} +{% if events.size > 0 %} +

Zukünftige

{% for event in events %} -

{{ event.title }}, {{ event.date | date: "%F" }}

+

{{ event.title }}, {{ event.date | date: "%F" }}

{{ event.excerpt }} - {% endfor %} +{% endif %} + +{% assign events = site.events | sort: "date", "last" | where_exp:"event","event.date < site.time" %} +{% if events.size > 0 %} +

Vergangene

+{% for event in events | sort: "date", "last" | where_exp:"event","event.date < site.time" %} +

{{ event.title }}, {{ event.date | date: "%F" }}

+{{ event.excerpt }} +{% endfor %} +{% endif %}