Skip to content

Commit 058c51d

Browse files
committed
feat: expand nav, fix install-box mobile overflow
- Add Features and Support section links to the top nav and matching anchors (#features, #support); footer Project column mirrors the nav order. - Move the nav/mobile-menu breakpoint to md for the wider link set. - Add min-w-0 to the install command code so the long URL scrolls inside the box instead of widening the page.
1 parent b1034ca commit 058c51d

5 files changed

Lines changed: 33 additions & 13 deletions

File tree

web/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default function Home() {
148148

149149
{/* Feature stream: the signature flow line runs down the left margin,
150150
connecting capabilities like data moving through a siphon. */}
151-
<section className="mx-auto max-w-6xl px-6 py-12">
151+
<section id="features" className="mx-auto max-w-6xl scroll-mt-24 px-6 py-12">
152152
<p className="eyebrow mb-10">what it does</p>
153153
<div className="flex gap-8">
154154
<div className="flowline hidden shrink-0 sm:block" aria-hidden />

web/components/InstallCommand.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ export function InstallCommand({ command }: { command: string }) {
4343
<span aria-hidden className="text-(--amber) select-none">
4444
$
4545
</span>
46-
<code className="flex-1 overflow-x-auto whitespace-nowrap text-(--paper)">{command}</code>
46+
{/* min-w-0 lets this flex item shrink below the command's intrinsic
47+
width so the long URL scrolls inside the box instead of widening the
48+
page (flex items default to min-width:auto). */}
49+
<code className="min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-(--paper)">
50+
{command}
51+
</code>
4752
<span
4853
className={`text-xs tracking-widest uppercase select-none ${
4954
copied ? "text-(--flow)" : "text-(--muted) group-hover:text-(--amber)"

web/components/SiteFooter.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,24 @@ export function SiteFooter() {
3030

3131
<div>
3232
<p className="eyebrow mb-3">Project</p>
33+
{/* Mirrors the top-nav order: Features · Install · Support · Docs,
34+
plus footer-appropriate repo links. */}
3335
<ul className="space-y-2 text-sm">
36+
<li>
37+
<Link href="/#features" className="text-(--muted) no-underline hover:text-(--paper)">
38+
Features
39+
</Link>
40+
</li>
41+
<li>
42+
<Link href="/#install" className="text-(--muted) no-underline hover:text-(--paper)">
43+
Install
44+
</Link>
45+
</li>
46+
<li>
47+
<Link href="/#support" className="text-(--muted) no-underline hover:text-(--paper)">
48+
Support
49+
</Link>
50+
</li>
3451
<li>
3552
<Link href="/docs" className="text-(--muted) no-underline hover:text-(--paper)">
3653
Documentation
@@ -49,11 +66,6 @@ export function SiteFooter() {
4966
Releases
5067
</ExtLink>
5168
</li>
52-
<li>
53-
<Link href="/#install" className="text-(--muted) no-underline hover:text-(--paper)">
54-
Install
55-
</Link>
56-
</li>
5769
</ul>
5870
</div>
5971

web/components/SiteHeader.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ import { useRepoStats } from "@/components/useGitHub";
88
import { ExtLink } from "@/components/ExtLink";
99

1010
// Nav items. `match` decides the active state: docs is active for any /docs/*
11-
// route; the others match their exact path (or hash target on home).
11+
// route; the in-page section links use root-relative hashes (/#id) so they work
12+
// from any route (Next navigates home, then scrolls). GitHub is external.
1213
const NAV: { label: string; href: string; match: (p: string) => boolean; external?: boolean }[] = [
13-
{ label: "Docs", href: "/docs", match: (p) => p.startsWith("/docs") },
14+
{ label: "Features", href: "/#features", match: () => false },
1415
{ label: "Install", href: "/#install", match: () => false },
16+
{ label: "Support", href: "/#support", match: () => false },
17+
{ label: "Docs", href: "/docs", match: (p) => p.startsWith("/docs") },
1518
{ label: "GitHub", href: REPO_URL, match: () => false, external: true },
1619
];
1720

@@ -32,7 +35,7 @@ export function SiteHeader() {
3235
</Link>
3336

3437
{/* Desktop nav */}
35-
<nav className="hidden items-center gap-7 text-sm sm:flex">
38+
<nav className="hidden items-center gap-6 text-sm md:flex">
3639
{NAV.map((item) =>
3740
item.external ? (
3841
<ExtLink
@@ -59,7 +62,7 @@ export function SiteHeader() {
5962
{/* Mobile toggle */}
6063
<button
6164
type="button"
62-
className="sm:hidden"
65+
className="md:hidden"
6366
aria-label={open ? "Close menu" : "Open menu"}
6467
aria-expanded={open}
6568
onClick={() => setOpen((v) => !v)}
@@ -80,7 +83,7 @@ export function SiteHeader() {
8083

8184
{/* Mobile menu */}
8285
{open && (
83-
<nav className="border-t border-(--line) px-6 py-4 sm:hidden">
86+
<nav className="border-t border-(--line) px-6 py-4 md:hidden">
8487
<ul className="space-y-3 text-sm">
8588
{NAV.map((item) => (
8689
<li key={item.label}>

web/components/SupportSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function SupportSection() {
88
const [primary, ...rest] = FUNDING;
99

1010
return (
11-
<section className="mx-auto max-w-3xl px-6 py-20 text-center">
11+
<section id="support" className="mx-auto max-w-3xl scroll-mt-24 px-6 py-20 text-center">
1212
<p className="eyebrow mb-4">support</p>
1313
<h2 className="mb-4 text-3xl">Free and open source</h2>
1414
<p className="mx-auto mb-8 max-w-md leading-relaxed text-(--muted)">

0 commit comments

Comments
 (0)