Verbeterde opmaak kalender inclusief link naar OpenStreetMap
This commit is contained in:
parent
8a279aa667
commit
204916c9dc
3 changed files with 10 additions and 8 deletions
|
@ -6,19 +6,19 @@
|
|||
{{ $upcoming_events := sort $upcoming_events ".date_start" "asc" }}
|
||||
{{ range first 50 (where $upcoming_events "date_start" "gt" (dateFormat "2006-01-02" now)) }}
|
||||
<div style="border: 1px solid darkgray; border-radius: 2px; padding:10px; margin:2px;">
|
||||
<h3>{{ .name }}</h3>
|
||||
<h3>{{ .date_start | dateFormat "02-01-2006" }} - {{ .name }}</h3>
|
||||
{{ with .organizer }}<p><em>Georganizeerd door {{ .}}</em></p>{{ end }}
|
||||
{{ if eq .date_start .date_end }}
|
||||
{{ .date_start | dateFormat "02-01-2006" }}
|
||||
{{ else }}
|
||||
Van {{ .date_start | dateFormat "02-01-2006" }} t/m {{ .date_end | dateFormat "02-01-2006" }}
|
||||
{{ if ne .date_start .date_end }}
|
||||
<p>Event van meerdere dagen: {{ .date_start | dateFormat "02-01-2006" }} t/m {{ .date_end | dateFormat "02-01-2006" }}</p>
|
||||
{{ end }}
|
||||
|
||||
{{ $event_location := .event_location | default "Locatie onbekend" }}
|
||||
{{ with .event_address }}
|
||||
<p><strong>Adres</strong>: {{ with .street_address }}{{ . }}{{ end }}{{ with .postal_code }}, {{ . }}{{ end }}{{ with .city }}, {{ . }}{{ end }}{{ with .country }}, {{ . }}{{ end }}</p>
|
||||
<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 }}" target="_blank" rel="noopener">{{ partial "show-svg-icon.html" (dict "context" . "icon" "map-location-dot") }}</a>
|
||||
{{ end }}
|
||||
{{ with .link_external }}
|
||||
<a href="{{ . }}" rel="nofollow">Meer informatie (externe link)</a>
|
||||
<p>» <a href="{{ . }}" rel="nofollow">Meer informatie (externe link)</a></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
1
themes/nluug/layouts/partials/show-svg-icon.html
Normal file
1
themes/nluug/layouts/partials/show-svg-icon.html
Normal file
|
@ -0,0 +1 @@
|
|||
<img src="/afbeeldingen/iconen/{{ .icon }}.svg" height="20" width="20" alt="{{ .icon | default .Site.Params.textNoTitle }}">
|
Loading…
Add table
Add a link
Reference in a new issue