Problem
The default and paper themes duplicate significant layout logic:
- Sidebar rendering and tree traversal
- Version switcher component
- Content directory buttons/dropdown
- Mobile menu handling
- Icon rendering from config
This makes bug fixes and feature additions (like new sidebar features) require changes in two places.
Suggested Fix
Extract shared components into `src/themes/shared/` or `src/components/layout/`:
- `SidebarTree` — recursive tree rendering with configurable depth, icons, and active state
- `VersionSwitcher` — already exists as separate files but with duplicated logic
- `ContentDirNav` — content directory buttons/dropdown selector
- `MobileMenu` — slide-out menu with sidebar content
Each theme would compose these shared components with its own layout structure and styling.
Problem
The default and paper themes duplicate significant layout logic:
This makes bug fixes and feature additions (like new sidebar features) require changes in two places.
Suggested Fix
Extract shared components into `src/themes/shared/` or `src/components/layout/`:
Each theme would compose these shared components with its own layout structure and styling.