update theme
This commit is contained in:
parent
920db1a5ce
commit
43ddb22f80
17 changed files with 1462 additions and 207 deletions
|
@ -1,60 +1,60 @@
|
|||
{{ define "title" }}
|
||||
“{{ .Title | plainify }}” | {{ .Site.Title }}
|
||||
“{{ .Title | plainify }}” | {{ .Site.Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-class" }}--single layouts-blog-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 }}
|
||||
{{ 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 }}
|
||||
{{ 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>
|
||||
var map = L.map('map').setView([55, -3], 13);
|
||||
{{ with .Params.locations }}
|
||||
<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);
|
||||
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/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 }}
|
||||
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/tex-chtml.js"></script>
|
||||
<script src="/js/mathjax/config.js"></script>
|
||||
{{ 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>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-header" }}
|
||||
|
@ -241,14 +241,23 @@
|
|||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ if fileExists ( path.Join $.Page.File.Dir "Corrigendum.md" ) }}
|
||||
<section class="article-body__corrigendum">
|
||||
{{ if fileExists ( path.Join $.Page.File.Dir "corrigendum.md" ) }}
|
||||
<section class="article-body__corrigendum" itemprop="correction" itemscope itemtype="https://schema.org/CorrectionComment">
|
||||
<h2 class="subheading subheading--corrigendum" id="corrigendum">Corrigendum</h2>
|
||||
{{ $file := path.Join $.Page.File.Dir "corrigendum.md" | readFile }}
|
||||
{{ $file | .RenderString }}
|
||||
</section>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ with .Page.Resources.Get "comments.md" }}
|
||||
<section class="site-content__comments">
|
||||
<h2 class="subheading subheading--comments" id="comments">Comments</h2>
|
||||
<ul class="comment__thread">
|
||||
{{ .RenderShortcodes }}
|
||||
</il>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-footer" }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue