From ed0f12022faee2fad3f9f37aed1ddb98d4619cf2 Mon Sep 17 00:00:00 2001 From: Zaldimmar Date: Wed, 30 Sep 2026 23:37:36 -0500 Subject: [PATCH] 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 --- docs/updating-data-in-code.md | 2 +- src/components/Footer.tsx | 6 +- src/components/Layout.tsx | 148 ++++++++++------------------ src/components/PageShell.tsx | 39 ++++++-- src/components/admin/SectionNav.tsx | 3 +- src/lib/frontPageBands.ts | 38 +++++++ src/lib/navSections.ts | 34 +++++++ src/navConfig.ts | 16 +-- src/pages/Community.tsx | 1 + src/pages/History.tsx | 1 + src/pages/Home.tsx | 82 +++++---------- src/pages/Organization.tsx | 129 +++++++++++++----------- src/pages/Resources.tsx | 1 + src/pages/Retreats.tsx | 1 + src/pages/sections/FeedbackForm.tsx | 13 ++- src/pages/sections/QrCodeMaker.tsx | 6 +- 16 files changed, 283 insertions(+), 237 deletions(-) create mode 100644 src/lib/frontPageBands.ts create mode 100644 src/lib/navSections.ts diff --git a/docs/updating-data-in-code.md b/docs/updating-data-in-code.md index ececced..325f5df 100644 --- a/docs/updating-data-in-code.md +++ b/docs/updating-data-in-code.md @@ -267,7 +267,7 @@ The numbers band's "Number Source" dropdown works the same way: | What | File | Notes | | --- | --- | --- | -| Header and footer navigation, page subnav links | `src/navConfig.ts` | `PAGE_LINKS`, `PAGE_SECTIONS`, `NAV_ACTIONS`. A new page also needs a route in `src/App.tsx`. | +| Header and footer navigation, each page's sections (the header dropdowns, mobile menu and footer site map) | `src/navConfig.ts` | `PAGE_LINKS` (order), `PAGE_SECTIONS`, `NAV_ACTIONS`. The front page's sections aren't listed there: they follow the bands it shows (Front page → Sections), through `src/lib/navSections.ts` and `src/lib/frontPageBands.ts` (each band's anchor and default heading). A new page also needs a route in `src/App.tsx`. | | Section titles, blurbs and colors on Retreats, Community, Organization, Resources, Feedback, Privacy, Terms | the page file in `src/pages/` | the `SECTIONS` array at the top. A section's `id` must match its subnav `hash`. | | Site-wide announcement banner | `src/data/bannerConfig.ts` | `enabled: false` hides it. Bump `id` when the message changes, so people who dismissed the old one see the new one. | | History page decade headers | `src/data/historyDecades.ts` | Title, tagline and blurb per decade. | diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index a2e48f9..c252e21 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,5 +1,6 @@ import { Link } from "react-router-dom"; -import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts"; +import { PAGE_LINKS, NAV_ACTIONS } from "../navConfig.ts"; +import { useNavSections } from "../lib/navSections.ts"; import siteLogo from "../assets/logos/NGU_Logo.svg"; import PlatformIcon from "./PlatformIcon.tsx"; import { ORGANIZATION_DETAILS as Organization_Details } from "../data/organizationDetails.ts"; @@ -44,6 +45,7 @@ const sectionLinkClass = const headingClass = "text-white/90 text-sm font-semibold mb-4"; export default function Footer() { + const sectionsOf = useNavSections(); return (