From df57b54bdece6183b4c2244fc1a5921eb011cbce Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sat, 12 Sep 2026 21:04:02 -0700 Subject: [PATCH] Breadcrumbs on every page, and a sidebar that unfolds to where you are (#170) Anthony: "this needs a cookie crumb navbar, all pages need this with the new IA" and "broad and drill down, I'm not seeing that in the sidebar". lib/crumbs.ts derives the trail from the path and the spec registry, so no page declares it: /openthreat is Home > Specs > Catalogs a site serves about itself > OpenThreat, /opencpu adds OpenServer before OpenCPU, /docs/openthreat ends in Specification, /docs/cli is Home > Docs > CLI, a blog post passes its title as the leaf. components/breadcrumbs.tsx renders it (server-rendered, with a BreadcrumbList JSON-LD) at the top of every SiteShell page; the SPA routes rendered by page-markup.ts get the same trail as a string. components/side-nav.tsx replaces the flat sidebar: the four groups stay, and under Specs the family the current page belongs to unfolds to its specs, and the spec to its blocks, marked active. The home page string marks the active entry for the SPA routes too. Claude-Session: https://claude.ai/code/session_014cmNRtR2vL1p89dbVQ7FZJ Co-authored-by: Claude Fable 5.1 --- .../logicsrc-web/src/app/[[...slug]]/page.tsx | 2 +- .../logicsrc-web/src/app/blog/[slug]/page.tsx | 2 +- .../logicsrc-web/src/app/docs/[slug]/page.tsx | 2 +- .../src/components/breadcrumbs.tsx | 46 +++++++++ apps/logicsrc-web/src/components/side-nav.tsx | 89 +++++++++++++++++ .../src/components/site-shell.tsx | 39 +++----- apps/logicsrc-web/src/lib/crumbs.ts | 99 +++++++++++++++++++ apps/logicsrc-web/src/lib/page-markup.ts | 6 +- apps/logicsrc-web/src/styles.css | 57 +++++++++++ 9 files changed, 310 insertions(+), 32 deletions(-) create mode 100644 apps/logicsrc-web/src/components/breadcrumbs.tsx create mode 100644 apps/logicsrc-web/src/components/side-nav.tsx create mode 100644 apps/logicsrc-web/src/lib/crumbs.ts diff --git a/apps/logicsrc-web/src/app/[[...slug]]/page.tsx b/apps/logicsrc-web/src/app/[[...slug]]/page.tsx index 21161e3..4797bd4 100644 --- a/apps/logicsrc-web/src/app/[[...slug]]/page.tsx +++ b/apps/logicsrc-web/src/app/[[...slug]]/page.tsx @@ -70,7 +70,7 @@ export default async function Page({ return ( <> -
+
); diff --git a/apps/logicsrc-web/src/app/blog/[slug]/page.tsx b/apps/logicsrc-web/src/app/blog/[slug]/page.tsx index 16e2858..8284fc6 100644 --- a/apps/logicsrc-web/src/app/blog/[slug]/page.tsx +++ b/apps/logicsrc-web/src/app/blog/[slug]/page.tsx @@ -117,7 +117,7 @@ export default async function BlogPostPage({ const html = sanitizeRenderedHtml(post.html); return ( - +