Dyslexia-friendly tweaks.

This commit is contained in:
Benjamin A. Shelton 2026-11-23 19:48:25 -07:00
commit 6022da1eff
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
3 changed files with 52 additions and 11 deletions

View file

@ -11,7 +11,7 @@ const base = import.meta.env.BASE_URL;
---
<!doctype html>
<html lang="en">
<html lang="en" class="df">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -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;
}
});
</script>
</head>
<body class="flex flex-col min-h-screen">

View file

@ -41,7 +41,7 @@ const meta = `{
import { bindModals } from '../../utils/modal.js';
bindModals();
</script>
<article class="content" id="notes-page">
<article class="content study-notes" id="notes-page">
<div class="header">
<hgroup>
<h1 id="title">{note.data.title}</h1>

View file

@ -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;