diff --git a/app/src/components/HeaderNav.tsx b/app/src/components/HeaderNav.tsx index 051151d..8f871f5 100644 --- a/app/src/components/HeaderNav.tsx +++ b/app/src/components/HeaderNav.tsx @@ -3,8 +3,8 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react"; -import { MotionConfig, motion, useReducedMotion } from "motion/react"; -import { Menu, Search, X } from "lucide-react"; +import { AnimatePresence, MotionConfig, motion, useReducedMotion } from "motion/react"; +import { ArrowUpRight, BookOpen, Bot, ChartCandlestick, ChevronRight, Menu, MessagesSquare, Rocket, Search, X } from "lucide-react"; import { cn } from "@/lib/utils"; import { isTypingTarget } from "@/lib/command-palette"; import { heroCtaOnScreen, subscribeHeroCta } from "@/lib/hero-cta"; @@ -19,15 +19,18 @@ import LivePulse from "./launchpad/LivePulse"; import { BridgeButton, BridgeProvider } from "./bridge/BridgeProvider"; const NAV = [ - { href: "/", label: "Launchpad" }, - { href: "/feed", label: "Posts" }, - { href: "/rules", label: "How it works" }, - { href: "/agents", label: "Agents" }, + { href: "/", label: "Launchpad", hint: "Live launches, charts and trades", icon: ChartCandlestick }, + { href: "/feed", label: "Posts", hint: "What people say about tokens", icon: MessagesSquare }, + { href: "/rules", label: "How it works", hint: "What a launch does and costs", icon: BookOpen }, + { href: "/agents", label: "Agents", hint: "Launch and trade from an agent", icon: Bot }, // /me is reached from the wallet menu ("Your workspace") and the footer ("Your dashboard") ]; type Pulse = { visits: number; online: number }; +/** The glass the strip turns into while it floats: translucent card, a hairline of light on top, a soft drop shadow. */ +const FLOATING = "bg-card/80 shadow-[inset_0_1px_0_rgb(255_255_255/0.06),var(--shadow-card-hover)] dark:bg-card/75"; + /** * Site header: a floating instrument strip. Full-width hairline row at rest; * past 100px of scroll the navigation shell contracts it into a @@ -80,15 +83,27 @@ function useShortcutLabel(): string { } /** - * The header's way into search: one icon button that names its shortcut. The strip is already full at - * rest (pulse, four links, five controls), so a labelled field would push it past the page column; - * the home redesign gives search a proper field. + * The header's tools in one capsule: search, bridge, notifications and theme read as one group beside the wallet and + * the launch button, instead of four separate frames. Each tool inside is a borderless 30px button. */ -function SearchTrigger({ onClick }: { onClick: () => void }) { +function Rail({ children, className }: { children: React.ReactNode; className?: string }) { + return ( +
+ {children} +
+ ); +} + +/** + * The header's way into search: the first tool in the rail, naming its shortcut beside the icon while the strip + * rests at full width (xl and up). The home redesign gives search a proper field. + */ +function SearchTrigger({ onClick, compact = false }: { onClick: () => void; compact?: boolean }) { const shortcut = useShortcutLabel(); return ( - ); } @@ -114,13 +129,15 @@ function Desktop({ visible = false, pulse, isActive, quietCta, onSearch }: { vis className={cn( "border border-line transition-colors", // At rest: a full-width hairline ROW, content padded to the page column - // (max-w-6xl minus its px-4). Floating: a bordered card pill over the - // content. The shell animates the width and corner radius together. + // (--page-max and --page-pad in globals.css). Floating: a glass pill + // over the content. The shell animates the width and corner radius together. visible - ? "max-w-6xl px-3 bg-card/90 dark:bg-card/90" - : "max-w-none border-x-0 border-t-0 px-[max(16px,calc((100vw-1120px)/2))] bg-paper dark:bg-paper", + ? `max-w-6xl px-2.5 ${FLOATING}` + : "max-w-none border-x-0 border-t-0 px-[max(var(--page-pad),calc((100vw_-_var(--page-max))/2_+_var(--page-pad)))] bg-paper dark:bg-paper", )} > + {/* at rest, the bottom hairline catches a little brand light in the middle */} + {!visible ?