diff --git a/app/(marketing)/documentatie/[category]/page.tsx b/app/(marketing)/documentatie/[category]/page.tsx index ed0c422..6ea2813 100644 --- a/app/(marketing)/documentatie/[category]/page.tsx +++ b/app/(marketing)/documentatie/[category]/page.tsx @@ -52,8 +52,8 @@ export default async function ReleasePage({ params }: ReleasePageProps) { const { frontmatter, content } = release return ( -
-
+
+
{/* Header */}
diff --git a/app/(marketing)/documentatie/components/release-sidebar.tsx b/app/(marketing)/documentatie/components/release-sidebar.tsx index c15ccee..d1f1702 100644 --- a/app/(marketing)/documentatie/components/release-sidebar.tsx +++ b/app/(marketing)/documentatie/components/release-sidebar.tsx @@ -9,8 +9,8 @@ import Link from 'next/link' import { usePathname } from 'next/navigation' -import { ChevronRight, ChevronDown } from 'lucide-react' -import { useState } from 'react' +import { ChevronRight, ChevronDown, ChevronLeft, X } from 'lucide-react' +import { useState, useEffect } from 'react' import type { ReleaseNote, GroupMetadata, CategoryMetadata } from '@/lib/mdx/documentatie' interface ReleaseSidebarProps { @@ -23,6 +23,7 @@ interface ReleaseSidebarProps { export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) { const pathname = usePathname() + const [isExpanded, setIsExpanded] = useState(false) const [expandedGroups, setExpandedGroups] = useState>({ foundation: true, features: true, @@ -30,6 +31,11 @@ export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) { bugs: true, }) + // Auto-close sidebar on navigation + useEffect(() => { + setIsExpanded(false) + }, [pathname]) + const toggleGroup = (groupId: string) => { setExpandedGroups(prev => ({ ...prev, @@ -50,34 +56,125 @@ export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) { return ( <> - {/* Mobile: Horizontal scroll menu */} -
-
- - Overzicht - - {releases.map((release) => ( - - {release.frontmatter.title} - - ))} -
-
+ {/* MOBILE: Overlay when expanded */} + {isExpanded && ( +
setIsExpanded(false)} + aria-hidden="true" + /> + )} - {/* Desktop: Fixed sidebar */} + {/* MOBILE: Collapsible sidebar from left */} + + + {/* DESKTOP: Fixed sidebar */}