Navigation in the admin: header and footer links, page titles, hidden pages, Shop
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>
This commit is contained in:
parent
b49497cc59
commit
0cc2a3f721
30 changed files with 716 additions and 216 deletions
|
|
@ -40,7 +40,7 @@
|
|||
import { Fragment, useEffect, useState, type ReactNode, type RefObject } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import { PAGE_LINKS } from '../navConfig.ts'
|
||||
import { useSiteNav } from '../lib/useSiteNav.ts'
|
||||
|
||||
type Inline = string | { href: string; children: Inline[] }
|
||||
|
||||
|
|
@ -240,6 +240,7 @@ function Anchor({ href, children }: { href: string; children: ReactNode }) {
|
|||
|
||||
export default function ReaderView({ source }: { source: RefObject<HTMLElement | null> }) {
|
||||
const [blocks, setBlocks] = useState<Block[]>([])
|
||||
const { main: pages } = useSiteNav()
|
||||
|
||||
useEffect(() => {
|
||||
const root = source.current
|
||||
|
|
@ -264,7 +265,7 @@ export default function ReaderView({ source }: { source: RefObject<HTMLElement |
|
|||
return (
|
||||
<article className="reader">
|
||||
<p>
|
||||
{PAGE_LINKS.map((page, i) => (
|
||||
{pages.map((page, i) => (
|
||||
<span key={page.path}>
|
||||
{i > 0 && ' · '}
|
||||
<Link to={page.path}>{page.label}</Link>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue