2023-05-09 12:45:03 +02:00
{{ define "main" }}
{{ .Content }}
< h2 > Aankomende evenementen< / h2 >
{{ $upcoming_events := .Site.Data.evenementen.kalender }}
2023-05-16 09:40:02 +02:00
{{ $upcoming_events := sort $upcoming_events ".date_start" "asc" }}
2023-06-26 11:38:27 +02:00
< div class = "three-column-grid" >
2023-05-16 09:40:02 +02:00
{{ range first 50 (where $upcoming_events "date_start" "gt" (dateFormat "2006-01-02" now)) }}
2023-06-26 11:38:27 +02:00
< div id = "{{ anchorize (.date_start | dateFormat " 2006-01-02 " ) } } - { { anchorize . name } } " >
< h3 > {{ .name }}< / h3 >
{{ if .organizer }}< small > < em > Georganiseerd door {{ .organizer }}< / em > < / small > {{ end }}
{{ if .event_organizer }}< small > < em > Georganiseerd door {{ if .event_organizer_url }}< a href = "{{ .event_organizer_url }}" rel = "nofollow noopener" > {{ .event_organizer }}< / a > {{ else }}{{ .event_organizer }}{{ end }}< / em > < / small > {{ end }}
{{ if ne .date_start .date_end }}
< p > Event van meerdere dagen: < time class = "g time" datetime = "{{ dateFormat " 2006-01-02 " . date_start } } " > {{ .date_start | time.Format ":date_full" }}< / time > t/m < time class = "g time" datetime = "{{ dateFormat " 2006-01-02 " . date_end } } " > {{ .date_end | time.Format ":date_full" }}< / time > < / p >
{{ else }}
< p > Datum: < time class = "g time" datetime = "{{ dateFormat " 2006-01-02 " . date_start } } " > {{ .date_start | time.Format ":date_full" }}< / time > < / p >
{{ end }}
{{ $event_location := .event_location | default "Locatie onbekend" }}
{{ with .event_address }}
< h4 > Locatie en adres< / h4 >
< p > < strong > {{ $event_location }}< / strong > < br > {{ with .street_address }}{{ . }}{{ end }}< br > {{ with .postal_code }}{{ . }}{{ end }}{{ with .city }}, {{ . }}{{ end }}{{ with .country }}, {{ . }}{{ end }}< / p >
< a href = "https://www.openstreetmap.org/search?query={{ with .street_address }}{{ . | urlquery }}{{ end }},{{ with .postal_code }}{{ . | urlquery }}{{ end }}{{ with .city }},%20{{ . | urlquery }}{{ end }}" > {{ partial "show-svg-icon.html" (dict "context" . "icon" "map-location-dot" "title" "Bekijk locatie op OpenStreetMap") }}< / a >
{{ end }}
{{ with .link_external }}
2023-07-01 19:56:18 +02:00
< p > » < a href = "{{ . }}" rel = "nofollow" > Meer informatie< / a > (externe link)< / p >
{{ end }}
{{ with .event_url }}
{{ if findRE `^http` . 1 }}
< p > » < a href = "{{ . }}" rel = "nofollow" > Meer informatie< / a > (externe link)< / p >
{{ else }}
< p > » < a href = "{{ . }}" > Meer informatie< / a > < / p >
{{ end }}
2023-06-26 11:38:27 +02:00
{{ end }}
< / div >
2023-06-26 09:51:18 +02:00
2023-06-26 11:38:27 +02:00
< script type = "application/ld+json" >
{
"@context": "https://schema.org",
"@type": "Event",
"name": "{{ .name }}",
"startDate": "{{ .date_start | dateFormat "02-01-2006" }}",
"endDate": "{{ .date_end | dateFormat "02-01-2006" }}",
"eventAttendanceMode": "https://schema.org/{{ if .event_attendance_mode }}{{ .event_attendance_mode | strings.FirstUpper }}{{ else }}Offline{{ end }}EventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
2023-07-01 11:34:14 +02:00
{{ if .event_address }}
2023-06-26 11:38:27 +02:00
"location": {
"@type": "Place",
"address": {
"@type": "PostalAddress",
2023-07-01 11:34:14 +02:00
{{ with .event_address.city }}"addressLocality": "{{ . }}",{{ end }}
{{ with .event_address.street_address }}"streetAddress": "{{ . }}",{{ end }}
{{ with .event_address.postal_code }}"postalCode": "{{ . }}",{{ end }}
2023-06-26 11:38:27 +02:00
"addressCountry": "{{ if .country }}{{ .country }}{{ else }}The Netherlands{{ end }}"
2023-07-01 11:34:14 +02:00
},
"name": "{{ .event_location | default "Niet ingevuld" }}"
2023-06-26 11:38:27 +02:00
},
{{ end }}
{{ if .event_virtual_location }}
"location": {
"@type": "VirtualLocation",
"url": "{{ . }}"
},
{{ end }}
{{ with .event_image }}
"image": [
"{{ .url }}"
],
{{ end }}
"description": "{{ if .event_description }}{{ .event_description }}{{ else }}{{ default .name }}{{ with .event_location}} @ {{ . }}{{ end }}{{ end }}",
{{ if .event_organizer }}
"performer": {
"@type": "Organization",
"name": "{{ .event_organizer }}"
},
"organizer": {
"@type": "Organization",
"name": "{{ .event_organizer }}",
"url": "{{ .event_organizer_url }}"
},
{{ end }}
{{ if .event_url }}
"url": "{{ .event_url }}",
{{ else if .link_external }}
"url": "{{ .link_external }}",
{{ end }}
"isAccessibleForFree": {{ if .event_free_access }}true{{ else }}false{{ end }}
}
< / script >
2023-05-16 09:40:02 +02:00
{{ end }}
2023-06-26 11:38:27 +02:00
< / div >
2023-05-09 12:45:03 +02:00
{{ end }}