Skip to content

Commit

Permalink
oops!
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgs committed Oct 21, 2024
1 parent 502aaa7 commit 56787e0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions assets/scripts/core/theme-scheme.js
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
11 changes: 0 additions & 11 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 56787e0

Please sign in to comment.