update theme
This commit is contained in:
parent
ee87009471
commit
920db1a5ce
43 changed files with 848 additions and 6444 deletions
|
@ -2,19 +2,57 @@
|
|||
|
||||
{{ define "head-description" }}{{ .Summary | plainify }}{{ end }}
|
||||
|
||||
{{ define "main-class" }}--single{{ end }}
|
||||
{{ define "main-class" }}--single layouts-default-single{{ end }}
|
||||
|
||||
{{ 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>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "header-styles" }}
|
||||
{{ with .Params.styles }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ ( $.Page.Resources.GetMatch "style").RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ with .Params.locations }}
|
||||
<link rel="stylesheet" href="/css/leaflet.css">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer-scripts" }}
|
||||
{{ with .Params.locations }}
|
||||
<script src="/js/openlayers.js"></script>
|
||||
{{ $script := resources.Get "js/render-meta-map.js" | resources.ExecuteAsTemplate "render-meta-map.js" . }}
|
||||
<script src="{{ $script.RelPermalink }}"></script>
|
||||
<script>
|
||||
var map = L.map('map').setView([55, -3], 13);
|
||||
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
|
||||
var latLons = [];
|
||||
{{ range . }}
|
||||
{{ with ( index $.Site.Data.locations . ) }}
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
latLons.push([{{ .lat }}, {{ .lon }}]);
|
||||
{{ else }}
|
||||
{{ warnf "Could not find lat-lon for %q (%q)" . $.File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
map.fitBounds(latLons);
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ with .Params.scripts }}
|
||||
{{ if in . "mathjax" }}
|
||||
<script src="/js/polyfill.js"></script>
|
||||
<script id="MathJax-script" async src="/js/mathjax.js"></script>
|
||||
<script src="/js/mathjax-config.js"></script>
|
||||
<script id="MathJax-script" async src="/js/mathjax/tex-chtml.js"></script>
|
||||
<script src="/js/mathjax/config.js"></script>
|
||||
{{ end }}
|
||||
{{ if in . "charts" }}
|
||||
{{ $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>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue