Verbeterde opmaak kalender inclusief link naar OpenStreetMap

This commit is contained in:
Michael Boelen 2023-05-16 10:27:43 +02:00
parent 8a279aa667
commit 204916c9dc
3 changed files with 10 additions and 8 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"/></svg>

After

Width:  |  Height:  |  Size: 818 B

View file

@ -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>&raquo; <a href="{{ . }}" rel="nofollow">Meer informatie (externe link)</a></p>
{{ end }}
</div>
{{ end }}

View file

@ -0,0 +1 @@
<img src="/afbeeldingen/iconen/{{ .icon }}.svg" height="20" width="20" alt="{{ .icon | default .Site.Params.textNoTitle }}">