# Admin Sidebar Navigation ## Overview The admin sidebar provides navigation across all admin pages. It features collapsible sections with state persistence, active page indicators, and responsive mobile support. **File Location:** `app/templates/admin/partials/sidebar.html` --- ## Sidebar Structure The sidebar is organized into the following sections: | Section | Collapsible | Pages | |---------|-------------|-------| | Dashboard | No | Dashboard | | Platform Administration | Yes | Companies, Vendors, Users, Customers, Marketplace | | Content Management | Yes | Platform Homepage, Content Pages, Vendor Themes | | Developer Tools | Yes | Components, Icons, Testing Hub, Code Quality | | Platform Monitoring | Yes | Import Jobs, Application Logs | | Settings | No | Settings | --- ## Collapsible Sections ### How It Works Sections can be expanded/collapsed by clicking the section header. The state is persisted to `localStorage` so sections remain open/closed across page navigation and browser sessions. ### State Management **File:** `static/admin/js/init-alpine.js` ```javascript // Default state: Platform Administration open, others closed const defaultSections = { platformAdmin: true, contentMgmt: false, devTools: false, monitoring: false }; // State stored in localStorage under this key const SIDEBAR_STORAGE_KEY = 'admin_sidebar_sections'; ``` ### Available Methods | Method | Description | |--------|-------------| | `toggleSection(section)` | Toggle a section open/closed | | `expandSectionForCurrentPage()` | Auto-expand section containing current page | | `openSections.platformAdmin` | Check if Platform Administration is open | | `openSections.contentMgmt` | Check if Content Management is open | | `openSections.devTools` | Check if Developer Tools is open | | `openSections.monitoring` | Check if Platform Monitoring is open | ### CSS Transitions Sections animate smoothly using CSS transitions (no plugins required): ```html