Skip to content

Commit

Permalink
Force dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemoralespou committed Oct 15, 2024
1 parent 7290c1d commit ccae33f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@
<!--================= 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';
}
}
theme = 'dark';
document.documentElement.setAttribute('data-theme', theme);
</script>
</head>
Expand Down

0 comments on commit ccae33f

Please sign in to comment.