Reading mode: every page and section reads as text

The reader (ReaderView.tsx) now reads an icon-only link's label, puts
a card's link on its first line or picture when it has no heading,
gives each item of a row of facts or links its own line, keeps line
breaks, skips what CSS hides, turns a form into one line saying it
can't be used there, shows empty table cells as "-", keeps section and
heading ids so #links land, and opens file links as files.

What it can't read draws its own text version (useReadingMode()):
the hero, pathfinder, front page history, event lists (every event,
past ones too), org lists and groups map (every region and group,
linked), history timeline (every year open), schedules (every day,
fold-outs included), people tiles (everyone, with details) and videos.

Also: org names are linked headings, heading levels fixed where cards
repeated their section's, Team pages lose the doubled "Members",
Giving links the treasurer's email and names Church Center.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-03 17:12:27 -05:00
parent c79910ef8d
commit 27e5fbd690
24 changed files with 788 additions and 180 deletions

View file

@ -14,6 +14,9 @@
corners, as the only rounded thing besides buttons and dots. A link that embeds.ts can't turn into a
player (not https, or not a host it knows how to frame) still
goes somewhere: the still becomes a link to it.
Reading mode (readingMode.ts) gets a link to the video (an
uploaded file's own address), named by its title.
═══════════════════════════════════════════════════════════════ */
import { Play } from '@phosphor-icons/react'
@ -23,6 +26,7 @@ import HomeLink from '../pages/sections/home/HomeLink.tsx'
import { playingSource, videoSource, videoThumbnails } from '../lib/embeds.ts'
import { BRAND } from '../lib/color.ts'
import { focusOnMount } from '../lib/focus.ts'
import { useReadingMode } from '../lib/readingMode.ts'
export default function VideoPlayer({
@ -40,6 +44,16 @@ export default function VideoPlayer({
const [playing, setPlaying] = useState(false)
const [skipped, setSkipped] = useState(0)
const source = videoSource(url)
const reading = useReadingMode()
if (reading) {
const href = source?.kind === 'file' ? source.src : url
return href ? (
<p>
<a href={href}>{title || 'Watch the video'}</a>
</p>
) : null
}
if (playing && source) {
const live = playingSource(source)