forked from laurens/fediversity_website
Structuur aanbrengen in weergave van events
This commit is contained in:
parent
015369928f
commit
66d170e225
|
@ -4,13 +4,16 @@
|
|||
<h2>Aankomende evenementen</h2>
|
||||
{{ $upcoming_events := .Site.Data.evenementen.kalender }}
|
||||
{{ $upcoming_events := sort $upcoming_events ".date_start" "asc" }}
|
||||
<div class="three-column-grid">
|
||||
{{ range first 50 (where $upcoming_events "date_start" "gt" (dateFormat "2006-01-02" now)) }}
|
||||
<div id="{{ anchorize (.date_start | dateFormat "2006-01-02") }}-{{ anchorize .name }}" style="border: 1px solid darkgray; border-radius: 2px; padding:10px; margin:2px;">
|
||||
<h3>{{ .date_start | dateFormat "02-01-2006" }} - {{ .name }}</h3>
|
||||
{{ with .organizer }}<p><em>Georganiseerd door {{ .}}</em></p>{{ end }}
|
||||
{{ with .event_organizer }}<p><em>Georganiseerd door {{ .}}</em></p>{{ end }}
|
||||
<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 | dateFormat "02-01-2006" }}</time> t/m <time class="g time" datetime="{{ dateFormat "2006-01-02" .date_end }}">{{ .date_end | dateFormat "02-01-2006" }}</time></p>
|
||||
<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 }}
|
||||
|
@ -44,6 +47,12 @@
|
|||
}
|
||||
},
|
||||
{{ end }}
|
||||
{{ if .event_virtual_location }}
|
||||
"location": {
|
||||
"@type": "VirtualLocation",
|
||||
"url": "{{ . }}"
|
||||
},
|
||||
{{ end }}
|
||||
{{ with .event_image }}
|
||||
"image": [
|
||||
"{{ .url }}"
|
||||
|
@ -70,4 +79,5 @@
|
|||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Reference in a new issue