-
CHORUS
+
);
};
diff --git a/brand-assets/brand-style-guide-site/src/components/Sidebar.tsx b/brand-assets/brand-style-guide-site/src/components/Sidebar.tsx
index 10f07b2..29a26ed 100644
--- a/brand-assets/brand-style-guide-site/src/components/Sidebar.tsx
+++ b/brand-assets/brand-style-guide-site/src/components/Sidebar.tsx
@@ -1,47 +1,189 @@
-import React from 'react';
+'use client';
+
+import React, { useState } from 'react';
import Link from 'next/link';
+import { usePathname } from 'next/navigation';
+import ThreeLogo from './ThreeLogo'; // Replace with the correct path to the ThreeLogo component
+
+interface NavItem {
+ href: string;
+ section: string;
+ icon: string;
+ label: string;
+}
+
+interface NavCategory {
+ id: string;
+ label: string;
+ icon: string;
+ items: NavItem[];
+}
const Sidebar = () => {
- const navLinks = [
- { href: '/', section: 'overview', icon: 'Navigation/House_01', label: 'Brand Overview' },
- { href: '/identity', section: 'identity', icon: 'User/User_01', label: 'Brand Identity' },
- { href: '/usage', section: 'usage', icon: 'Interface/Book', label: 'Usage Guidelines' },
- { href: '/logo', section: 'logo', icon: 'Interface/Star', label: 'Logo System' },
- { href: '/typography', section: 'typography', icon: 'Edit/Text', label: 'Typography' },
- { href: '/colors', section: 'colors', icon: 'Edit/Swatches_Palette', label: 'Color Palette' },
- { href: '/iconography', section: 'iconography', icon: 'Interface/Main_Component', label: 'Iconography' },
- { href: '/accessibility', section: 'accessibility', icon: 'Interface/Heart_01', label: 'Accessibility' },
- { href: '/components', section: 'components', icon: 'Interface/Settings', label: 'Components' },
- { href: '/motion', section: 'motion', icon: 'Interface/Link', label: 'Motion System' },
- { href: '/implementation', section: 'implementation', icon: 'File/File_Code', label: 'Implementation' },
- { href: '/communications', section: 'communications', icon: 'Communication/Chat', label: 'Language Support' },
- { href: '/public-relations', section: 'public-relations', icon: 'Communication/Paper_Plane', label: 'Public Relations' },
- { href: '/investor-relations', section: 'investor-relations', icon: 'Interface/Chart_Line', label: 'Investor Relations' },
- { href: '/collaborators', section: 'collaborators', icon: 'User/Users_Group', label: 'Collaborators' },
- { href: '/social-media', section: 'social-media', icon: 'Communication/Share_iOS_Export', label: 'Social Media' },
- { href: '/visual-identity', section: 'visual-identity', icon: 'Interface/Main_Component', label: 'Visual Identity' },
- { href: '/culture', section: 'culture', icon: 'Environment/Bulb', label: 'Culture' },
+ const pathname = usePathname();
+ const [expandedSections, setExpandedSections] = useState
(['overview']);
+
+ // Organize navigation items into categories matching primary nav
+ const navCategories: NavCategory[] = [
+ {
+ id: 'overview',
+ label: 'Overview',
+ icon: 'Navigation/House_01',
+ items: [
+ { href: '/', section: 'overview', icon: 'Navigation/House_01', label: 'Brand Overview' },
+ { href: '/identity', section: 'identity', icon: 'User/User_01', label: 'Brand Identity' },
+ { href: '/usage', section: 'usage', icon: 'Interface/Book', label: 'Usage Guidelines' },
+ ]
+ },
+ {
+ id: 'visual-identity',
+ label: 'Visual Identity',
+ icon: 'Interface/Main_Component',
+ items: [
+ { href: '/visual-identity', section: 'visual-identity', icon: 'Interface/Main_Component', label: 'Visual Identity' },
+ { href: '/logo', section: 'logo', icon: 'Interface/Star', label: 'Logo System' },
+ { href: '/typography', section: 'typography', icon: 'Edit/Text', label: 'Typography' },
+ { href: '/colors', section: 'colors', icon: 'Edit/Swatches_Palette', label: 'Color Palette' },
+ { href: '/iconography', section: 'iconography', icon: 'Interface/Main_Component', label: 'Iconography' },
+ { href: '/accessibility', section: 'accessibility', icon: 'Interface/Heart_01', label: 'Accessibility' },
+ { href: '/components', section: 'components', icon: 'Interface/Settings', label: 'Components' },
+ { href: '/motion', section: 'motion', icon: 'Interface/Link', label: 'Motion System' },
+ { href: '/implementation', section: 'implementation', icon: 'File/File_Code', label: 'Implementation' },
+ ]
+ },
+ {
+ id: 'communications',
+ label: 'Communications',
+ icon: 'Communication/Chat',
+ items: [
+ { href: '/culture', section: 'culture', icon: 'Environment/Bulb', label: 'Culture' },
+ { href: '/communications', section: 'communications', icon: 'Communication/Chat', label: 'Language Support' },
+ { href: '/public-relations', section: 'public-relations', icon: 'Communication/Paper_Plane', label: 'Public Relations' },
+ { href: '/investor-relations', section: 'investor-relations', icon: 'Interface/Chart_Line', label: 'Investor Relations' },
+ { href: '/collaborators', section: 'collaborators', icon: 'User/Users_Group', label: 'Collaborators' },
+ { href: '/social-media', section: 'social-media', icon: 'Communication/Share_iOS_Export', label: 'Social Media' },
+ ]
+ }
];
+ const toggleSection = (sectionId: string) => {
+ setExpandedSections(prev =>
+ prev.includes(sectionId)
+ ? prev.filter(id => id !== sectionId)
+ : [sectionId] // Only keep the newly opened section
+ );
+ };
+
+ // Check if current path belongs to a category to auto-expand it
+ React.useEffect(() => {
+ const currentCategory = navCategories.find(category =>
+ category.items.some(item => item.href === pathname)
+ );
+
+ if (currentCategory) {
+ // Always set only the current category as expanded, closing others
+ setExpandedSections([currentCategory.id]);
+ }
+ }, [pathname]);
+
+ const isCurrentPage = (href: string) => pathname === href;
+ const isCategoryActive = (category: NavCategory) =>
+ category.items.some(item => item.href === pathname);
+
return (
-