From f968b1e8e80fb12aa21ab7d39aea56af794f5433 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sun, 13 Sep 2026 04:00:39 +0000 Subject: [PATCH] Breadcrumbs on every page, and a sidebar that unfolds to where you are 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. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_014cmNRtR2vL1p89dbVQ7FZJ --- .../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 ( - +