fix: full-width top bar with logo, sidebar below
Restructure layout: top bar spans full width (Pulse logo left, user actions right) with continuous bottom border. Sidebar sits below with no vertical border collision. Remove logo from sidebar. Remove all transition-colors from nav items to prevent white flash on click.
This commit is contained in:
@@ -14,11 +14,13 @@ export default function DashboardShell({
|
|||||||
const { mobileOpen, closeMobile } = useSidebar()
|
const { mobileOpen, closeMobile } = useSidebar()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen overflow-hidden">
|
<div className="flex flex-col h-screen overflow-hidden">
|
||||||
<Sidebar siteId={siteId} mobileOpen={mobileOpen} onMobileClose={closeMobile} />
|
{/* Top bar: full width — logo left, actions right */}
|
||||||
<div className="flex-1 flex flex-col min-w-0 overflow-hidden">
|
<UtilityBar />
|
||||||
<UtilityBar />
|
{/* Below: sidebar + content */}
|
||||||
<main className="flex-1 overflow-y-auto">
|
<div className="flex flex-1 overflow-hidden">
|
||||||
|
<Sidebar siteId={siteId} mobileOpen={mobileOpen} onMobileClose={closeMobile} />
|
||||||
|
<main className="flex-1 min-w-0 overflow-y-auto">
|
||||||
{children}
|
{children}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ function NavItemLink({
|
|||||||
} ${
|
} ${
|
||||||
isActive
|
isActive
|
||||||
? 'bg-brand-orange/10 text-brand-orange'
|
? 'bg-brand-orange/10 text-brand-orange'
|
||||||
: 'text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors'
|
: 'text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white hover:bg-neutral-100 dark:hover:bg-neutral-800'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<item.icon className="w-[18px] h-[18px] shrink-0" weight={isActive ? 'fill' : 'regular'} />
|
<item.icon className="w-[18px] h-[18px] shrink-0" weight={isActive ? 'fill' : 'regular'} />
|
||||||
@@ -253,21 +253,6 @@ export default function Sidebar({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full overflow-hidden">
|
<div className="flex flex-col h-full overflow-hidden">
|
||||||
{/* Logo */}
|
|
||||||
<Link
|
|
||||||
href="/"
|
|
||||||
className={`flex items-center gap-2.5 px-4 py-4 shrink-0 ${isCollapsed ? 'justify-center' : ''}`}
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
src="/pulse_icon_no_margins.png"
|
|
||||||
alt="Pulse"
|
|
||||||
className="w-8 h-8 shrink-0 object-contain"
|
|
||||||
/>
|
|
||||||
{!isCollapsed && (
|
|
||||||
<span className="text-lg font-bold text-neutral-900 dark:text-white tracking-tight">Pulse</span>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
{/* Site Picker */}
|
{/* Site Picker */}
|
||||||
<div className="pt-3 pb-2">
|
<div className="pt-3 pb-2">
|
||||||
<SitePicker sites={sites} currentSiteId={siteId} collapsed={isCollapsed} />
|
<SitePicker sites={sites} currentSiteId={siteId} collapsed={isCollapsed} />
|
||||||
|
|||||||
@@ -68,15 +68,31 @@ export default function UtilityBar() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="shrink-0 flex items-center justify-between border-b border-neutral-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 px-4 sm:px-8 py-3.5">
|
<div className="shrink-0 flex items-center justify-between border-b border-neutral-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 px-4 sm:px-8 py-3.5">
|
||||||
{/* Left: mobile sidebar toggle */}
|
{/* Left: Pulse logo + mobile toggle */}
|
||||||
<button
|
<div className="flex items-center gap-3">
|
||||||
onClick={openMobile}
|
<button
|
||||||
className="lg:hidden p-2 -ml-2 text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white transition-colors"
|
onClick={openMobile}
|
||||||
aria-label="Open navigation"
|
className="lg:hidden p-2 -ml-2 text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white transition-colors"
|
||||||
>
|
aria-label="Open navigation"
|
||||||
<MenuIcon className="w-5 h-5" />
|
>
|
||||||
</button>
|
<MenuIcon className="w-5 h-5" />
|
||||||
<div className="hidden lg:block" />
|
</button>
|
||||||
|
<Link
|
||||||
|
href="/"
|
||||||
|
className="flex items-center gap-3 group relative"
|
||||||
|
>
|
||||||
|
<div className="relative w-10 h-10 sm:w-11 sm:h-11 flex items-center justify-center shrink-0">
|
||||||
|
<img
|
||||||
|
src="/pulse_icon_no_margins.png"
|
||||||
|
alt="Pulse Logo"
|
||||||
|
className="w-full h-full object-contain group-hover:scale-105 transition-transform duration-300 transform-gpu will-change-transform [backface-visibility:hidden]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="text-xl sm:text-2xl font-bold text-neutral-900 dark:text-white tracking-tight group-hover:text-brand-orange transition-colors duration-300">
|
||||||
|
Pulse
|
||||||
|
</span>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Right: actions */}
|
{/* Right: actions */}
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user