From 66d170e22527cf462634aae6e60af6f00286b249 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 26 Jun 2023 11:38:27 +0200 Subject: [PATCH] Structuur aanbrengen in weergave van events --- themes/nluug/layouts/calendar/single.html | 136 ++++++++++++---------- 1 file changed, 73 insertions(+), 63 deletions(-) diff --git a/themes/nluug/layouts/calendar/single.html b/themes/nluug/layouts/calendar/single.html index 75af551..2be46f9 100644 --- a/themes/nluug/layouts/calendar/single.html +++ b/themes/nluug/layouts/calendar/single.html @@ -4,70 +4,80 @@

Aankomende evenementen

{{ $upcoming_events := .Site.Data.evenementen.kalender }} {{ $upcoming_events := sort $upcoming_events ".date_start" "asc" }} +
{{ range first 50 (where $upcoming_events "date_start" "gt" (dateFormat "2006-01-02" now)) }} -
-

{{ .date_start | dateFormat "02-01-2006" }} - {{ .name }}

- {{ with .organizer }}

Georganiseerd door {{ .}}

{{ end }} - {{ with .event_organizer }}

Georganiseerd door {{ .}}

{{ end }} - {{ if ne .date_start .date_end }} -

Event van meerdere dagen: t/m

- {{ end }} - {{ $event_location := .event_location | default "Locatie onbekend" }} - {{ with .event_address }} -

Locatie en adres

-

{{ $event_location }}
{{ with .street_address }}{{ . }}{{ end }}
{{ with .postal_code }}{{ . }}{{ end }}{{ with .city }}, {{ . }}{{ end }}{{ with .country }}, {{ . }}{{ end }}

- {{ partial "show-svg-icon.html" (dict "context" . "icon" "map-location-dot" "title" "Bekijk locatie op OpenStreetMap") }} - {{ end }} - {{ with .link_external }} -

» Meer informatie (externe link)

- {{ end }} -
+
+

{{ .name }}

+ {{ if .organizer }}Georganiseerd door {{ .organizer }}{{ end }} + {{ if .event_organizer }}Georganiseerd door {{ if .event_organizer_url }}{{ .event_organizer }}{{ else }}{{ .event_organizer }}{{ end }}{{ end }} + {{ if ne .date_start .date_end }} +

Event van meerdere dagen: t/m

+ {{ else }} +

Datum:

+ {{ end }} + {{ $event_location := .event_location | default "Locatie onbekend" }} + {{ with .event_address }} +

Locatie en adres

+

{{ $event_location }}
{{ with .street_address }}{{ . }}{{ end }}
{{ with .postal_code }}{{ . }}{{ end }}{{ with .city }}, {{ . }}{{ end }}{{ with .country }}, {{ . }}{{ end }}

+ {{ partial "show-svg-icon.html" (dict "context" . "icon" "map-location-dot" "title" "Bekijk locatie op OpenStreetMap") }} + {{ end }} + {{ with .link_external }} +

» Meer informatie (externe link)

+ {{ end }} +
- + {{ end }} +
{{ end }}