move non-blocking js to footer
This commit is contained in:
parent
1658df3bc4
commit
af11ad02b7
@ -67,6 +67,43 @@
|
|||||||
<script src="{{ . | absURL }}"></script>
|
<script src="{{ . | absURL }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<script src="/pagefind/pagefind-ui.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
($ => {
|
||||||
|
$(window).on('DOMContentLoaded', () => {
|
||||||
|
new PagefindUI({
|
||||||
|
element: "#search",
|
||||||
|
translations: {
|
||||||
|
placeholder: "Suchen...",
|
||||||
|
zero_results: "Leider konnten keine Ergebnisse zu [SEARCH_TERM] gefunden werden",
|
||||||
|
clear_search: "Löschen"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#pagefind-search').on('shown.bs.modal', () => {
|
||||||
|
$('.pagefind-ui__search-input').focus();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var _paq = window._paq = window._paq || [];
|
||||||
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
|
_paq.push(["setDoNotTrack", true]);
|
||||||
|
_paq.push(["disableCookies"]);
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="https://analytics.cantorgymnasium.de/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '1']);
|
||||||
|
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);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
{{ $script := resources.Get "js/script.js" | minify }}
|
{{ $script := resources.Get "js/script.js" | minify }}
|
||||||
<script src="{{ $script.Permalink }}"></script>
|
<script src="{{ $script.Permalink }}"></script>
|
||||||
|
|
||||||
|
@ -22,42 +22,6 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
|
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
|
||||||
<script src="/pagefind/pagefind-ui.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
($ => {
|
|
||||||
$(window).on('DOMContentLoaded', () => {
|
|
||||||
new PagefindUI({
|
|
||||||
element: "#search",
|
|
||||||
translations: {
|
|
||||||
placeholder: "Suchen...",
|
|
||||||
zero_results: "Leider konnten keine Ergebnisse zu [SEARCH_TERM] gefunden werden",
|
|
||||||
clear_search: "Löschen"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#pagefind-search').on('shown.bs.modal', () => {
|
|
||||||
$('.pagefind-ui__search-input').focus();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})(jQuery);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var _paq = window._paq = window._paq || [];
|
|
||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
|
||||||
_paq.push(["setDoNotTrack", true]);
|
|
||||||
_paq.push(["disableCookies"]);
|
|
||||||
_paq.push(['trackPageView']);
|
|
||||||
_paq.push(['enableLinkTracking']);
|
|
||||||
(function() {
|
|
||||||
var u="https://analytics.cantorgymnasium.de/";
|
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
|
||||||
_paq.push(['setSiteId', '1']);
|
|
||||||
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);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{{ partial "opengraph" . }}
|
{{ partial "opengraph" . }}
|
||||||
{{ partial "twitter" . }}
|
{{ partial "twitter" . }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user