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" > - +

)}
- );