update theme

This commit is contained in:
Ben Goldsworthy 2023-10-03 13:08:35 +01:00
parent 43ddb22f80
commit a35946ae92
19 changed files with 1418 additions and 223 deletions

View file

@ -6,8 +6,7 @@
{{ define "header-scripts" }}
{{ with .Params.locations }}
{{ $mapJS := resources.Get "js/leaflet.js" | fingerprint }}
<script id="Map-script" src="{{ $mapJS.Permalink }}" integrity="{{ $mapJS.Data.Integrity }}"></script>
<script id="Map-script" src="/js/leaflet.js"></script>
{{ end }}
{{ end }}
@ -36,10 +35,12 @@
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
latLons.push([{{ .lat }}, {{ .lon }}]);
{{ else }}
{{ warnf "Could not find lat-lon for %q (%q)" . $.File.Path }}
{{ erroridf "missing-lat-lon" "Could not find lat-lon for %q (%q)" . $.File.Path }}
{{ end }}
{{ end }}
map.fitBounds(latLons);
if (map.getZoom() < 10) map.setZoom(10);
</script>
{{ end }}
{{ with .Params.scripts }}
@ -50,10 +51,9 @@
{{ end }}
{{ end }}
{{ if $.HasShortcode "chart" }}
{{ $chartsCoreJS := resources.Get "js/chart.js" | fingerprint }}
{{ $chartsConfigJS := $.Page.Resources.GetMatch "charts-init" }}
<script id="Charts-script" src="{{ $chartsCoreJS.Permalink }}" integrity="{{ $chartsCoreJS.Data.Integrity }}"></script>
<script id="Charts-config-script" src="{{ $chartsConfigJS.Permalink }}"></script>
{{ $chartsConfigJS := $.Page.Resources.GetMatch "charts-init" | fingerprint }}
<script id="Charts-script" src="/js/chart.js"></script>
<script id="Charts-config-script" src="{{ $chartsConfigJS.Permalink }}" integrity="{{ $chartsConfigJS.Data.Integrity }}"></script>
{{ end }}
{{ end }}
@ -255,7 +255,7 @@
<h2 class="subheading subheading--comments" id="comments">Comments</h2>
<ul class="comment__thread">
{{ .RenderShortcodes }}
</il>
</ul>
</section>
{{ end }}
{{ end }}