Navigation: section dropdowns, a side nav, Home's sections from the front page

- The header's second strip is gone: each top link drops down its
  page's sections on hover or keyboard focus.
- Retreats, Community, Resources, Organization and History get the
  admin editors' "On this page" column (SectionNav), sticky at the
  left from lg up, with the section being read lit.
- Home's sections in the dropdown, mobile menu, footer site map, the
  feedback form and the QR maker are the bands the front page is
  showing, in its order and under its headings (navSections.ts,
  frontPageBands.ts, which Home.tsx now draws from too).
- Resources comes before Organization in the nav and footer.
- The Organization page draws from its own editor's content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 23:37:36 -05:00
parent 43797f38bc
commit ed0f12022f
16 changed files with 283 additions and 237 deletions

View file

@ -34,7 +34,8 @@
import { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
import QrCode, { QR_DOVE, QR_INK, QR_PAPER, type QrCenter } from '../../components/QrCode.tsx'
import { NAV_ACTIONS, PAGE_LINKS, PAGE_SECTIONS } from '../../navConfig.ts'
import { NAV_ACTIONS, PAGE_LINKS } from '../../navConfig.ts'
import { useNavSections } from '../../lib/navSections.ts'
import { awardHref, blogHref, eventHref, orgHref, personHref, teamHref } from '../../lib/hrefs.ts'
import { siteUrl } from '../../lib/site.ts'
import { useDirectory, type Directory } from '../../lib/useContent.ts'
@ -252,6 +253,7 @@ function downloadPng(svg: SVGSVGElement, stem: string) {
}
export default function QrCodeMaker() {
const sectionsOf = useNavSections();
const { data: directory, loading, error } = useDirectory()
const [kind, setKind] = useState<Kind>('pages')
@ -277,7 +279,7 @@ export default function QrCodeMaker() {
}
}, [choices, path])
const sections = kind === 'pages' ? (PAGE_SECTIONS[path] ?? []) : []
const sections = kind === 'pages' ? sectionsOf(path) : []
const selected = choices.find((c) => c.path === path) ?? null
const typed = kind === 'custom' ? typedUrl(custom) : null
const target = kind === 'custom' ? typed : selected ? `${selected.path}${section}` : null