Improvements to a11y, scripts, and About page
This commit is contained in:
parent
ed22306c34
commit
580cd2da26
10 changed files with 104 additions and 82 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue