removed toggle dark mode from example as manualy switching it seems to be not possbile

master
Lars Hoogestraat 8 months ago
parent 38cd9f05ed
commit 9177380628
  1. 23
      exampleSite/layouts/index.html

@ -1,23 +0,0 @@
{{ define "main"}}
<article>
{{ .Content }}
<h2>Toggle Dark Mode</h2>
<form>
<input type="checkbox" id="toggleDarkMode">
<label for="toggleDarkMode">Toggle Dark/Light mode</label>
</form>
<script type="text/javascript">
let toggleDarkMode = document.getElementById("toggleDarkMode");
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
toggleDarkMode.checked = true
}
document.documentElement.classList.add("light")
</script>
</article>
{{ end }}
Loading…
Cancel
Save