Page management, step 1: every page in a registry, new pages, hidden and disabled
Migration 080 makes site_pages the list of every page: address, title, intro, Hidden, Disabled (out of menus, sitemap and search) and card order. site.json's pages and Navigation's page list move into it. Pages -> Page management (one editor in place of six) makes new pages of sections at any free address; the admin home opens Pages with a banner and a card per page. A catch-all route draws whatever page is at an address; the fixed pages take their words from the registry and can't be deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
56acedf926
commit
1342691f49
36 changed files with 584 additions and 405 deletions
28
src/App.tsx
28
src/App.tsx
|
|
@ -49,16 +49,9 @@ const lazyPage = (load) =>
|
|||
throw err
|
||||
}),
|
||||
)
|
||||
// Community, Retreats, Resources, Organization, History and Shop:
|
||||
// each built in the admin from sections.
|
||||
const SitePage = lazyPage(() => import("./pages/SitePage.tsx"))
|
||||
const Feedback = lazyPage(() => import("./pages/Feedback.tsx"))
|
||||
const Request = lazyPage(() => import("./pages/Request.tsx"))
|
||||
const Giving = lazyPage(() => import("./pages/Giving.tsx"))
|
||||
const QrCodes = lazyPage(() => import("./pages/QrCodes.tsx"))
|
||||
const Privacy = lazyPage(() => import("./pages/Privacy.tsx"))
|
||||
const Terms = lazyPage(() => import("./pages/Terms.tsx"))
|
||||
const NotFound = lazyPage(() => import("./pages/NotFound.tsx"))
|
||||
// Every page at its address (Pages → Page management): its sections,
|
||||
// or one of the few the site draws in code (fixedPages.ts).
|
||||
const PageAtPath = lazyPage(() => import("./pages/PageAtPath.tsx"))
|
||||
// Profile accounts (076): signing in, an invite's welcome, the profile.
|
||||
const SignIn = lazyPage(() => import("./pages/SignIn.tsx"))
|
||||
const AccountWelcome = lazyPage(() => import("./pages/AccountWelcome.tsx"))
|
||||
|
|
@ -100,9 +93,7 @@ export default function App() {
|
|||
{/* Layout renders the nav once and swaps page content into <Outlet /> */}
|
||||
<Route element={<Layout />}>
|
||||
<Route index element={<Home />} />
|
||||
<Route path="retreats" element={<SitePage key="retreats" id="retreats" />} />
|
||||
<Route path="/events/:id" element={<EventDetail />} />
|
||||
<Route path="community" element={<SitePage key="community" id="community" />} />
|
||||
<Route path="/regions/:id" element={<OrganizationDetail />} />
|
||||
<Route path="/groups/:id" element={<OrganizationDetail />} />
|
||||
<Route path="/partners/:id" element={<OrganizationDetail />} />
|
||||
|
|
@ -112,20 +103,11 @@ export default function App() {
|
|||
<Route path="/people/:id" element={<PersonDetail />} />
|
||||
<Route path="/blog/:id" element={<BlogPost />} />
|
||||
<Route path="/directory/:id" element={<DirectoryPage />} />
|
||||
<Route path="organization" element={<SitePage key="organization" id="organization" />} />
|
||||
<Route path="resources" element={<SitePage key="resources" id="resources" />} />
|
||||
<Route path="history" element={<SitePage key="history" id="history" />} />
|
||||
<Route path="shop" element={<SitePage key="shop" id="shop" />} />
|
||||
<Route path="feedback" element={<Feedback />} />
|
||||
<Route path="request" element={<Request />} />
|
||||
<Route path="qr" element={<QrCodes />} />
|
||||
<Route path="give" element={<Giving />} />
|
||||
<Route path="privacy" element={<Privacy />} />
|
||||
<Route path="terms" element={<Terms />} />
|
||||
<Route path="sign-in" element={<SignIn />} />
|
||||
<Route path="account" element={<Account />} />
|
||||
<Route path="account/welcome" element={<AccountWelcome />} />
|
||||
<Route path="*" element={<NotFound />} />
|
||||
{/* Every page of the site: Pages → Page management (PageAtPath). */}
|
||||
<Route path="*" element={<PageAtPath />} />
|
||||
</Route>
|
||||
{/* A schedule as a slideshow for a screen: full screen, no Layout. */}
|
||||
<Route
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue