diff --git a/packages/docs/src/components/nav.tsx b/packages/docs/src/components/nav.tsx index 976f819..de12832 100644 --- a/packages/docs/src/components/nav.tsx +++ b/packages/docs/src/components/nav.tsx @@ -1,10 +1,15 @@ /** - * Sticky top bar, landing-parity: logo + site name + "Docs" badge, then the SAME - * link row as the landing page's nav (section anchors on the landing home, blog, - * docs) with the same sliding hover pill — so the two sites link into each other - * seamlessly. Section/blog links are plain anchors into the landing SPA one level - * up; "Docs" routes to this site's own root. The right side keeps the language - * and theme toggles, GitHub, and — on small screens — the sidebar toggle. + * Sticky top bar, landing-parity: logo + site name, then the SAME link row as the + * landing page's nav (section anchors on the landing home, blog, docs) with the same + * sliding hover pill — so the two sites render an identical navbar. Section/blog links + * are plain anchors into the landing SPA one level up; "Docs" routes to this site's + * own root and is always the active link. The right cluster also matches the landing + * nav (language + theme toggles, GitHub) and ends with the sidebar toggle on + `relative z-10 rounded-md px-2.5 py-1.5 text-sm transition-colors ${active ? activeLinkCls : deskInactiveLinkCls}`; /** * The hover pill appears IN PLACE under the first link it lands on (position @@ -64,25 +71,34 @@ export function Nav({ menuOpen, onToggleMenu }: { menuOpen: boolean; onToggleMen pillVisible.current = false; }; + const desktopLinks = ( + <> + {SECTION_IDS.map((id) => ( + + {sectionLabel[id]} + + ))} + + {S.nav.blog} + + {/* "Docs" is this SPA's own root — a router Link, and always the current page. */} + + {S.nav.docs} + + + ); + return (
- - {S.siteName} - - {S.docsBadge} -
@@ -123,6 +129,17 @@ export function Nav({ menuOpen, onToggleMenu }: { menuOpen: boolean; onToggleMen > + {/* Sidebar toggle: same slot and styling as the landing nav's menu button, but it + opens the docs sidebar and hides at lg (the sidebar's own breakpoint). */} +
diff --git a/packages/docs/src/lib/strings-en.ts b/packages/docs/src/lib/strings-en.ts index 071fdb6..84d8e57 100644 --- a/packages/docs/src/lib/strings-en.ts +++ b/packages/docs/src/lib/strings-en.ts @@ -3,7 +3,6 @@ import type { Strings } from "./strings"; export const en: Strings = { siteName: "PenguinHarness", - docsBadge: "Docs", nav: { highlights: "Highlights", diff --git a/packages/docs/src/lib/strings.ts b/packages/docs/src/lib/strings.ts index f3f7c92..ef294a4 100644 --- a/packages/docs/src/lib/strings.ts +++ b/packages/docs/src/lib/strings.ts @@ -7,7 +7,6 @@ */ export const zh = { siteName: "PenguinHarness", - docsBadge: "Docs", nav: { // Landing-parity labels: the top bar mirrors the landing page's nav exactly diff --git a/packages/landing/src/components/footer.tsx b/packages/landing/src/components/footer.tsx index 0ff5f31..ddbc3ca 100644 --- a/packages/landing/src/components/footer.tsx +++ b/packages/landing/src/components/footer.tsx @@ -1,4 +1,8 @@ -/** Site footer: brand + product/resource link columns + copyright. */ +/** + * Site footer: brand + product/resource link columns + copyright. The container is + * max-w-7xl to frame the page like the nav (chrome shared with the docs site), while + * content sections stay max-w-6xl. + */ import { Link } from "react-router"; import { S } from "../lib/strings"; import { DOCS_URL, LICENSE_URL, RELEASES_URL, REPO_URL } from "../lib/links"; @@ -12,7 +16,7 @@ export function Footer() { return (