Improve Stork theme integration, script locations
This commit is contained in:
parent
65853fccd2
commit
ab51476ba4
3 changed files with 18 additions and 15 deletions
|
@ -3,7 +3,10 @@
|
||||||
{{- partial "head.html" . -}}
|
{{- partial "head.html" . -}}
|
||||||
<body>
|
<body>
|
||||||
{{ if .Site.Params.Stork }}
|
{{ if .Site.Params.Stork }}
|
||||||
{{ partial "stork.html" . }}
|
<div class="stork-search">
|
||||||
|
<input data-stork="home" placeholder="🔎 Search {{ .Site.Title }}...">
|
||||||
|
</div>
|
||||||
|
<div data-stork="home-output"></div>
|
||||||
<br>
|
<br>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- partial "header.html" . -}}
|
{{- partial "header.html" . -}}
|
||||||
|
|
|
@ -52,6 +52,19 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<link rel="stylesheet" href="/css/normalize.css">
|
<link rel="stylesheet" href="/css/normalize.css">
|
||||||
<link rel="stylesheet" href="/css/sakura{{ if isset .Site.Params "theme" }}-{{ .Site.Params.Theme }}{{ end }}.css">
|
<link rel="stylesheet" href="/css/sakura{{ if isset .Site.Params "theme" }}-{{ .Site.Params.Theme }}{{ end }}.css">
|
||||||
|
{{ if .Site.Params.Stork }}
|
||||||
|
<link rel="stylesheet" href="/stork/stork.css">
|
||||||
|
<script src="/stork/stork.js"></script>
|
||||||
|
<script>
|
||||||
|
stork.initialize("/stork/stork.wasm");
|
||||||
|
window.onload = () => {
|
||||||
|
stork.register(
|
||||||
|
"home",
|
||||||
|
"/home.st"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
{{ if isset .Site.Params "matomositeid" }}
|
{{ if isset .Site.Params "matomositeid" }}
|
||||||
<script>
|
<script>
|
||||||
var _paq = window._paq = window._paq || [];
|
var _paq = window._paq = window._paq || [];
|
||||||
|
@ -65,7 +78,7 @@
|
||||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ $title }}{{ if not .IsHome }} - {{ .Site.Title }}{{ end }}</title>
|
<title>{{ $title }}{{ if not .IsHome }} - {{ .Site.Title }}{{ end }}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<div class="stork-search">
|
|
||||||
<input data-stork="posts" placeholder="🔎 Search {{ .Site.Title }}...">
|
|
||||||
</div>
|
|
||||||
<div data-stork="posts-output"></div>
|
|
||||||
<link rel="stylesheet" href="/stork/stork.css">
|
|
||||||
<script src="/stork/stork.js"></script>
|
|
||||||
<script>
|
|
||||||
stork.initialize("/stork/stork.wasm");
|
|
||||||
stork.register(
|
|
||||||
"posts",
|
|
||||||
"/home.st"
|
|
||||||
);
|
|
||||||
</script>
|
|
Reference in a new issue