Let signed-in visitors override the OS color scheme from the account menu without persisting across reloads, and keep themed logos in sync with the effective mode. Signed-off-by: Émile Ré <emile@probo.com>
58 lines
2.1 KiB
HTML
58 lines
2.1 KiB
HTML
<!doctype html>
|
|
<html lang="{{if .HTMLLang}}{{.HTMLLang}}{{else}}en{{end}}">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<script>
|
|
(function () {
|
|
var m = location.pathname.match(/^\/trust\/[^/]+/);
|
|
var b = document.createElement("base");
|
|
b.href = m ? m[0] + "/" : "/";
|
|
document.head.appendChild(b);
|
|
})();
|
|
</script>
|
|
|
|
<script>
|
|
// FOUC guard: apply the OS preference before JS bundles load. Runtime
|
|
// overrides (and further system-preference changes) are owned by
|
|
// src/lib/displayMode/displayMode.ts once the app boots.
|
|
(function () {
|
|
if (!window.matchMedia) return;
|
|
document.documentElement.classList.toggle(
|
|
"dark",
|
|
window.matchMedia("(prefers-color-scheme: dark)").matches,
|
|
);
|
|
})();
|
|
</script>
|
|
|
|
<meta name="color-scheme" content="light dark" />
|
|
|
|
<link rel="icon" id="favicon" href="{{if .FaviconURL}}{{.FaviconURL}}{{else}}/favicons/favicon.ico{{end}}">
|
|
|
|
<meta name="application-name" content=" " />
|
|
<meta name="msapplication-TileColor" content="#FFFFFF" />
|
|
<meta name="msapplication-TileImage" content="/favicons/mstile-144x144.png" />
|
|
<meta name="msapplication-square70x70logo" content="/favicons/mstile-70x70.png" />
|
|
<meta name="msapplication-square150x150logo" content="/favicons/mstile-150x150.png" />
|
|
<meta name="msapplication-wide310x150logo" content="/favicons/mstile-310x150.png" />
|
|
<meta name="msapplication-square310x310logo" content="/favicons/mstile-310x310.png" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>{{.Title}}</title>
|
|
<meta name="description" content="{{.Description}}">
|
|
<meta property="og:title" content="{{.Title}}">
|
|
<meta property="og:description" content="{{.Description}}">
|
|
<meta property="og:url" content="{{.OGURL}}">
|
|
<meta property="og:type" content="website">
|
|
{{if .CanonicalURL}}<link rel="canonical" href="{{.CanonicalURL}}">{{end}}
|
|
{{range .Hreflang}}<link rel="alternate" hreflang="{{.Lang}}" href="{{.Href}}">
|
|
{{end}}
|
|
</head>
|
|
|
|
<body class="text-sand-12 bg-sand-2">
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
|
|
</html>
|