oops!
This commit is contained in:
parent
502aaa7148
commit
56787e0963
2 changed files with 0 additions and 13 deletions
|
@ -1,6 +1,4 @@
|
|||
let theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'light'
|
||||
const b = 'bollocks!';
|
||||
console.log(b);
|
||||
if (theme === 'system') {
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
theme = 'dark'
|
||||
|
|
|
@ -11,17 +11,6 @@
|
|||
|
||||
<!--================= add analytics if enabled =========================-->
|
||||
{{- partial "analytics.html" . -}}
|
||||
<script>
|
||||
theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'light';
|
||||
if (theme == 'system') {
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
theme = 'dark';
|
||||
} else {
|
||||
theme = 'light';
|
||||
}
|
||||
}
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-bs-spy="scroll" data-bs-target="#TableOfContents" data-bs-offset="80">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue