Pages -> Navigation (migration 075) edits the header's pages and buttons and the footer's links; navConfig.ts is now only the defaults. Page titles and intros move there from Site settings. A hidden page answers Not found below viewer (server and app) and is out of the menus and sitemap; signed in, it shows with a bar. Adds a /shop page of sections, hidden, with its header button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
2.3 KiB
TypeScript
56 lines
2.3 KiB
TypeScript
/* ═══════════════════════════════════════════════════════════════
|
|
NAV DEFAULTS
|
|
|
|
The header's and footer's links are edited in Pages → Navigation
|
|
(075_site_nav.sql) and reach the app through useSiteNav
|
|
(src/lib/useSiteNav.ts). This is what the app starts from before
|
|
they arrive: the same links the migration seeded, so a dev server
|
|
with no page metadata, or a moment before /api/nav answers, still
|
|
has a menu. Change the menus in the admin, not here.
|
|
|
|
place: main the header's pages (sections drop down under
|
|
each); with a parent, in that page's dropdown
|
|
action the header's buttons (filled: the Give style,
|
|
also beside the footer's logo)
|
|
footer the footer's Get in Touch list
|
|
legal the footer's bottom row
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
export type NavPlace = 'main' | 'action' | 'footer' | 'legal'
|
|
|
|
export type NavLink = {
|
|
place: NavPlace
|
|
label: string
|
|
/** '/retreats', '/organization#contact', or an https:// address. */
|
|
path: string
|
|
/** A main link's page whose dropdown it sits in. */
|
|
parent: string | null
|
|
filled: boolean
|
|
newTab: boolean
|
|
}
|
|
|
|
const link = (place: NavPlace, label: string, path: string, more: Partial<NavLink> = {}): NavLink => ({
|
|
place,
|
|
label,
|
|
path,
|
|
parent: null,
|
|
filled: false,
|
|
newTab: false,
|
|
...more,
|
|
})
|
|
|
|
export const NAV_DEFAULTS: NavLink[] = [
|
|
link('main', 'Home', '/'),
|
|
link('main', 'Retreats', '/retreats'),
|
|
link('main', 'Community', '/community'),
|
|
link('main', 'Resources', '/resources'),
|
|
link('main', 'Organization', '/organization'),
|
|
link('main', 'History', '/history'),
|
|
link('action', 'Contact Us', '/organization#contact'),
|
|
link('action', 'Give', '/give', { filled: true, newTab: true }),
|
|
link('footer', 'Feedback', '/feedback'),
|
|
link('footer', 'Request', '/request'),
|
|
link('footer', 'Contact Us', '/organization#contact'),
|
|
link('legal', 'Privacy Policy', '/privacy'),
|
|
link('legal', 'Terms of Service', '/terms'),
|
|
]
|