From 6022da1eff9ee0b1ba463d2720331d6735c57eb0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Shelton" Date: Mon, 23 Nov 2026 19:48:25 -0700 Subject: [PATCH] Dyslexia-friendly tweaks. --- src/layouts/Layout.astro | 10 +------ src/pages/notes/[...id].astro | 2 +- src/styles/global.css | 51 ++++++++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 9e6b709..5752b23 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -11,7 +11,7 @@ const base = import.meta.env.BASE_URL; --- - + @@ -129,14 +129,6 @@ class ThemeToggler { } } new ThemeToggler(); - -window.addEventListener("click", (event) => { - const eventPath = event.composedPath(); - const isTargeted = eventPath.includes(document.getElementById("menu")) || eventPath.includes(document.getElementById("nav-menu")); - if (!isTargeted) { - document.getElementById("menu-toggle").checked = false; - } -}); diff --git a/src/pages/notes/[...id].astro b/src/pages/notes/[...id].astro index 4d1f699..d6bb038 100644 --- a/src/pages/notes/[...id].astro +++ b/src/pages/notes/[...id].astro @@ -41,7 +41,7 @@ const meta = `{ import { bindModals } from '../../utils/modal.js'; bindModals(); -
+

{note.data.title}

diff --git a/src/styles/global.css b/src/styles/global.css index 246c236..41c6a83 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -36,18 +36,63 @@ :root { --reading-font-family: inherit; + --reading-bg: inherit; + --reading-text: inherit; } html.df { --reading-font-family: "OpenDyslexic", sans-serif; + --reading-bg: #faf8f5; + --reading-text: #1e1e1e; } html.df .study-notes :is(em, i, blockquote) { font-style: normal; } +html.df .study-notes :is(em, i) { + text-decoration: underline; + text-decoration-color: var(--color-neutral-300); + text-decoration-thickness: 0.1em; +} + +html.df body { + background-color: var(--reading-bg); +} + +html.df article.content.study-notes { + a.scripture.christ, a.scripture.christ:hover { + color: inherit; + text-decoration: underline; + text-decoration-color: var(--color-rose-700); + text-decoration-thickness: 0.05em; + } + a.scripture.quote { + background-color: transparent; + } + blockquote { + @apply border-l-0 ml-10; + } + blockquote::before { + content: "“"; + font-family: serif; + position: relative; + float: left; + display: inline; + width: 0; + top: -0.3em; + left: -0.7em; + font-size: 10em; + opacity: 20%; + } + blockquote, blockquote a { + color: inherit; + } +} @utility study-notes { font-family: var(--reading-font-family); + background-color: var(--reading-bg); + color: var(--reading-text); letter-spacing: 0.035em; line-height: 1.7; max-width: 65ch; @@ -149,7 +194,11 @@ header { cursor: pointer; } #menu span.label-text { - @apply align-top inline ml-4; + @apply align-top opacity-0 invisible lg:visible xl:visible 2xl:visible inline ml-4; + @apply transition-opacity duration-300; + } + #menu:hover span { + @apply opacity-100; } #hamburger { display: inline-block;