Improvements to a11y, scripts, and About page

This commit is contained in:
Bad Manners 2024-08-18 23:01:45 -03:00
parent ed22306c34
commit 580cd2da26
10 changed files with 104 additions and 82 deletions

View file

@ -1,8 +1,8 @@
---
import DarkModeInline from "./AutoDarkMode.astro";
---
---
<script is:inline>!function(){var a="dark",b="auto",c="colorScheme",d=document.body.classList,e=localStorage,f=e.getItem(c);f&&f!==b?f===a&&d.add(a):(e.setItem(c,b),matchMedia("(prefers-color-scheme: dark)").matches&&d.add(a))}();</script>
<DarkModeInline />
<script>
(function () {
@ -12,6 +12,7 @@
}
document.querySelectorAll<HTMLElementTagNameMap["button"]>("button[data-dark-mode]").forEach((button) => {
button.classList.remove("hidden");
button.style.removeProperty("display");
button.setAttribute("aria-hidden", "false");
button.addEventListener("click", (e) => {
e.preventDefault();