public-web/layouts/partials/scripts.html
2023-08-30 21:16:52 +02:00

26 lines
943 B
HTML

<script>
const themeChoice = localStorage.getItem("theme")
document.documentElement.classList.toggle(
"dark",
themeChoice !== null
? themeChoice === "dark"
: window.matchMedia("(prefers-color-scheme: dark)").matches
);
</script>
<script defer src="/alpinejs-persist@3.13.0.min.js"></script>
<script defer src="/alpinejs@3.13.0.min.js"></script>
<script defer src="/popperjs-core@2.11.8.min.js"></script>
<script defer src="/tippyjs@6.3.7.min.js"></script>
<script type="module">
import * as Turbo from "/turbo@7.3.0.js";
Turbo.start()
</script>
{{- $js := resources.Get "main.js" | fingerprint -}}
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" defer ></script>
{{ if site.Params.plausibleSiteID -}}
<script async defer data-domain="{{ site.Params.plausibleSiteID }}" src="{{ site.Params.plausibleTrackerURL | default "https://plausible.io/js/plausible.js" }}"></script>
{{ end -}}