From 413c677173faffb664fe48f030d339cb89640250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 1 Mar 2026 08:58:33 +0100 Subject: [PATCH] refactor: align layout chrome with glass blueprint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AppHeader: - Remove shadcn Button → native 8×8 rounded glass icon buttons - Shrink to h-14 (from h-16) to match sidebar header - Add current tool name breadcrumb (navTitle) next to collapse toggle; shows context when sidebar is collapsed or on mobile AppSidebar: - Remove shadcn Button → native button for mobile close - Sidebar narrows to w-60 (from w-64); matches h-14 header - Active state: slim absolute left-bar (0.5px) replaces harsh border-l-2; bg-primary/10 tint kept; no border on the link itself - Nav item text refined: 13px font-medium title + 9px mono description - Border opacity drops to border-border/20 throughout (from border-border) - Footer: smaller mono text, lighter icon opacity AppPage: - Shrink from py-8 / text-2xl to py-5 / text-lg font-semibold - Icon wrapped in 7×7 glass pill (bg-primary/10) matching tool cards - Description moved inline under title as 10px mono, truncated - border-b border-border/20 separator between header and tool content Co-Authored-By: Claude Sonnet 4.6 --- components/layout/AppHeader.tsx | 60 +++++++----- components/layout/AppPage.tsx | 35 ++++--- components/layout/AppSidebar.tsx | 153 ++++++++++++++++--------------- 3 files changed, 140 insertions(+), 108 deletions(-) diff --git a/components/layout/AppHeader.tsx b/components/layout/AppHeader.tsx index 6cb1a44..6c172ec 100644 --- a/components/layout/AppHeader.tsx +++ b/components/layout/AppHeader.tsx @@ -1,42 +1,60 @@ 'use client'; import Link from 'next/link'; +import { usePathname } from 'next/navigation'; import { Menu, X, PanelLeftClose, PanelLeftOpen } from 'lucide-react'; -import { Button } from '@/components/ui/button'; +import { cn } from '@/lib/utils/cn'; import { useSidebar } from './SidebarProvider'; +import { getToolByHref } from '@/lib/tools'; import Logo from '@/components/Logo'; +const iconBtn = + 'w-8 h-8 flex items-center justify-center rounded-lg text-muted-foreground/50 hover:text-foreground hover:bg-white/5 transition-all'; + export function AppHeader() { const { toggle, isOpen, isCollapsed, toggleCollapse } = useSidebar(); + const pathname = usePathname(); + const tool = getToolByHref(pathname); return ( -
-
- - - + {isCollapsed + ? + : + } + + + {/* Mobile: logo home link */} + + + + {/* Current tool breadcrumb */} + {tool && ( +
+ / + + {tool.navTitle} + +
+ )}
- + {isOpen ? : } +
); } diff --git a/components/layout/AppPage.tsx b/components/layout/AppPage.tsx index 8ffd6ec..4beb97d 100644 --- a/components/layout/AppPage.tsx +++ b/components/layout/AppPage.tsx @@ -11,20 +11,31 @@ interface AppPageProps { export function AppPage({ title, description, icon: Icon, children, className }: AppPageProps) { return ( -
-
-
-
- {Icon && } -

{title}

+
+
+ + {/* Page header */} +
+
+ {Icon && ( +
+ +
+ )} +
+

{title}

+ {description && ( +

+ {description} +

+ )} +
- {description && ( -

- {description} -

- )}
- {children} + +
+ {children} +
); diff --git a/components/layout/AppSidebar.tsx b/components/layout/AppSidebar.tsx index a702503..cab4dfd 100644 --- a/components/layout/AppSidebar.tsx +++ b/components/layout/AppSidebar.tsx @@ -6,7 +6,6 @@ import { X, GitFork, Heart } from 'lucide-react'; import { cn } from '@/lib/utils/cn'; import Logo from '@/components/Logo'; import { useSidebar } from './SidebarProvider'; -import { Button } from '@/components/ui/button'; import { tools } from '@/lib/tools'; export function AppSidebar() { @@ -15,7 +14,7 @@ export function AppSidebar() { return ( <> - {/* Mobile Overlay Backdrop */} + {/* Mobile backdrop */} {isOpen && (
- {/* Sidebar Header */} + + {/* Header */}
- +
- +
{!isCollapsed && (
- - Kit - - + Kit + Browser-first toolkit
)} + {!isCollapsed && ( - + + )}
{/* Navigation */} - {/* Sidebar Footer */} + {/* Footer */}
{isCollapsed ? ( - + ) : (
-

- © {new Date().getFullYear()} Kit. - +

+ © {new Date().getFullYear()} Kit + Valknar @@ -143,14 +147,13 @@ export function AppSidebar() { target="_blank" rel="noopener noreferrer" title="View source" - className="text-muted-foreground hover:text-primary transition-colors duration-300" + className="text-muted-foreground/30 hover:text-primary transition-colors" > - +

)}
- );