2022-11-11 05:48:02 +00:00
|
|
|
{{ define "title" }}{{ .Title | plainify }} | {{ .Site.Title }}{{ end }}
|
|
|
|
|
|
|
|
{{ define "head-description" }}{{ .Summary | plainify }}{{ end }}
|
|
|
|
|
2023-08-07 22:23:46 +00:00
|
|
|
{{ define "main-class" }}--single layouts-default-single{{ end }}
|
|
|
|
|
|
|
|
{{ define "header-scripts" }}
|
|
|
|
{{ with .Params.locations }}
|
2025-01-27 22:34:33 +00:00
|
|
|
<script
|
|
|
|
id="Map-script"
|
|
|
|
src="/js/leaflet/leaflet.js"
|
|
|
|
></script>
|
2023-08-07 22:23:46 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "header-styles" }}
|
|
|
|
{{ with .Params.styles }}
|
2025-01-27 22:34:33 +00:00
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
type="text/css"
|
|
|
|
href="{{ ( $.Page.Resources.GetMatch "style").RelPermalink }}"
|
|
|
|
/>
|
2023-08-07 22:23:46 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ with .Params.locations }}
|
2025-01-27 22:34:33 +00:00
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
href="/css/leaflet/leaflet.css"
|
|
|
|
/>
|
2023-08-07 22:23:46 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-11-11 05:48:02 +00:00
|
|
|
|
|
|
|
{{ define "footer-scripts" }}
|
2025-01-27 22:34:33 +00:00
|
|
|
{{ with .Params.locations }}
|
2023-08-07 22:23:46 +00:00
|
|
|
<script>
|
|
|
|
var map = L.map('map').setView([55, -3], 13);
|
|
|
|
|
2024-08-09 21:03:12 +00:00
|
|
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
2023-08-07 22:23:46 +00:00
|
|
|
maxZoom: 19,
|
|
|
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
|
|
|
}).addTo(map);
|
|
|
|
|
|
|
|
var latLons = [];
|
2025-01-05 16:25:32 +00:00
|
|
|
{{ $locations := partialCached "util/get_location_leaf_nodes.html" $.Site.Data.locations -}}
|
2024-04-02 19:36:21 +00:00
|
|
|
{{- range . -}}
|
|
|
|
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
|
|
|
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
|
|
|
latLons.push([{{ .lat }}, {{ .lon }}]);
|
|
|
|
{{- else -}}
|
|
|
|
{{- erroridf "missing-lat-lon" "Could not find lat-lon for %q (%q)" . $.File.Path -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end }}
|
|
|
|
|
2023-08-07 22:23:46 +00:00
|
|
|
map.fitBounds(latLons);
|
|
|
|
</script>
|
2025-01-27 22:34:33 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ with .Params.scripts }}
|
|
|
|
{{ if in . "charts" }}
|
|
|
|
{{ $chartsConfigJS := $.Page.Resources.GetMatch "charts-init" | fingerprint }}
|
|
|
|
<script
|
|
|
|
id="Charts-script"
|
|
|
|
src="/js/chart/chart.js"
|
|
|
|
></script>
|
|
|
|
<script
|
|
|
|
id="Charts-config-script"
|
|
|
|
src="{{ $chartsConfigJS.Permalink }}"
|
|
|
|
integrity="{{ $chartsConfigJS.Data.Integrity }}"
|
|
|
|
></script>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-11-11 05:48:02 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main-header" }}
|
2025-01-27 22:34:33 +00:00
|
|
|
{{ partial "single/main-header.html" ( dict "pc" . "sc" $ ) }}
|
2022-11-11 05:48:02 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main-body" }}
|
2023-07-01 03:16:59 +00:00
|
|
|
<section class="site-content__body">
|
|
|
|
{{- if ( or .Params.internal_links .Params.external_links ) -}}
|
|
|
|
<section class="article__links">
|
|
|
|
{{- with .Params.internal_links -}}
|
2025-01-27 22:34:33 +00:00
|
|
|
<h3>Internal Links</h3>
|
|
|
|
<ul>
|
|
|
|
{{- range . -}}
|
|
|
|
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
|
|
|
<li><a href="{{ .link }}">{{ .title | safeHTML }}</a></li>
|
|
|
|
{{ else }}
|
|
|
|
<li><a href="{{ . }}">Link</a></li>
|
|
|
|
{{ end }}
|
|
|
|
{{- end -}}
|
|
|
|
</ul>
|
2023-07-01 03:16:59 +00:00
|
|
|
{{- end -}}
|
2025-01-27 22:34:33 +00:00
|
|
|
|
2023-07-01 03:16:59 +00:00
|
|
|
{{- with .Params.external_links -}}
|
2025-01-27 22:34:33 +00:00
|
|
|
<h3>External Links</h3>
|
|
|
|
<ul>
|
|
|
|
{{- range . -}}
|
|
|
|
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
|
|
|
|
<li>
|
|
|
|
<a
|
|
|
|
href="{{ .link }}"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
target="_blank"
|
|
|
|
>{{ .title | safeHTML }}</a
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
{{ else }}
|
|
|
|
<li>
|
|
|
|
<a
|
|
|
|
href="{{ . }}"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
target="_blank"
|
|
|
|
>Link</a
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{- end -}}
|
|
|
|
</ul>
|
2023-07-01 03:16:59 +00:00
|
|
|
{{- end -}}
|
|
|
|
</section>
|
|
|
|
{{- end -}}
|
2025-01-27 22:34:33 +00:00
|
|
|
|
2022-11-11 05:48:02 +00:00
|
|
|
{{ .Content }}
|
2023-07-01 03:16:59 +00:00
|
|
|
</section>
|
2022-11-11 05:48:02 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main-footer" }}
|
2025-01-27 22:34:33 +00:00
|
|
|
{{ partial "single/post-meta.html" ( dict "pc" . "sc" $ ) }}
|
2022-11-11 05:48:02 +00:00
|
|
|
{{ end }}
|