blog/themes/farallon/layouts/_default/baseof.html

30 lines
899 B
HTML
Raw Normal View History

2024-05-06 12:00:46 +08:00
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode | default " en" }}">
<head>
<title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }}</title>
{{ partial "head.html" . }}
</head>
<body class="">
<script>
window.DEFAULT_THEME = "{{ .Site.Params.defaultTheme }}";
if (localStorage.getItem("theme") == null) {
localStorage.setItem("theme", window.DEFAULT_THEME);
}
if (localStorage.getItem("theme") == "dark") {
document.querySelector("body").classList.add("dark");
}
if (localStorage.getItem("theme") == "auto") {
document.querySelector("body").classList.add("auto");
}
</script>
<div class="main">
{{ partial "navigation.html" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
</div>
</body>
</html>