mirror of https://github.com/jkjoy/hugoblog.git
30 lines
899 B
HTML
30 lines
899 B
HTML
<!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> |