feat: static header + collapsible sidebar navigation

Replace floating pill header with static variant for authenticated
views. Add collapsible sidebar with site picker, grouped navigation
(Analytics/Infrastructure), and mobile overlay drawer. Remove
horizontal SiteNav tab bar.
This commit is contained in:
Usman Baig
2026-03-18 15:30:17 +01:00
parent 9f7987fe07
commit 80ae8311dc
7 changed files with 474 additions and 31 deletions

31
lib/sidebar-context.tsx Normal file
View File

@@ -0,0 +1,31 @@
'use client'
import { createContext, useCallback, useContext, useState } from 'react'
interface SidebarContextValue {
mobileOpen: boolean
openMobile: () => void
closeMobile: () => void
}
const SidebarContext = createContext<SidebarContextValue>({
mobileOpen: false,
openMobile: () => {},
closeMobile: () => {},
})
export function SidebarProvider({ children }: { children: React.ReactNode }) {
const [mobileOpen, setMobileOpen] = useState(false)
const openMobile = useCallback(() => setMobileOpen(true), [])
const closeMobile = useCallback(() => setMobileOpen(false), [])
return (
<SidebarContext.Provider value={{ mobileOpen, openMobile, closeMobile }}>
{children}
</SidebarContext.Provider>
)
}
export function useSidebar() {
return useContext(SidebarContext)
}