Rotating words: {Next|Now} in titles and text cycles through its choices

Migration 084: site defaults for the motion (slide, flip, fade, type,
mirror), direction and seconds per word in Site settings, and a hero's
and a block's own. The hero's headline, section and band titles,
headings, paragraphs, callouts and quotes rotate; menus, tab titles,
search text and emails show the first word; less motion shows it still.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-17 00:43:59 -05:00
parent ab8dcdd608
commit a10ff6d75f
30 changed files with 411 additions and 37 deletions

View file

@ -15,6 +15,7 @@ import { useEffect, useRef, useState } from 'react'
import type { SectionStat } from '../../../lib/sectionTypes.ts'
import { prefersLessMotion } from '../../../lib/motion.ts'
import { useReadingMode } from '../../../lib/readingMode.ts'
import { Words } from '../../../components/RotatingWords.tsx'
const COUNT_MS = 1400
@ -50,7 +51,7 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
if (useReadingMode()) {
return (
<section id={id}>
<h2>{title}</h2>
<h2><Words text={title} /></h2>
{blurb && <p>{blurb}</p>}
<ul>
{stats.map((stat, index) => (
@ -74,7 +75,7 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
>
<div className="relative mx-auto max-w-6xl px-6">
<h2 className="font-display text-3xl font-bold text-white md:text-4xl">
{title}
<Words text={title} />
</h2>
{blurb && <p className="mt-3 max-w-2xl text-white/70">{blurb}</p>}