Make both the app sidebar (300px fixed) and admin sidebar (240px fixed) responsive so they look good on smaller laptop resolutions without breaking the layout.
| Phase | Viewport | App Sidebar | Admin Sidebar |
|---|---|---|---|
| Full | ≥ 1280px | 300px | 240px |
| Compact | 1024px – 1279px | 220px | 200px |
| Collapsed | < 1024px | Hidden, hamburger overlay | Hidden, hamburger overlay |
Both sidebars switch from hardcoded widths to CSS custom properties:
--sidebar-width: 300px on :root, used by .sidebar (width) and .content (margin-left)--sidebar-width: 240px, reusedtransition: width 0.2s ease / transition: margin-left 0.2s ease for smooth resizingMedia query overrides the CSS variable:
--sidebar-width: 220px--sidebar-width: 200pxNo structural HTML changes. Text still fits — longest app item "Document Management" fits at 220px with icon + gap + padding (~145px text + ~64px overhead). Admin items are all short (≤11 chars).
transform: translateX(-100%) — hidden off-screen leftmargin-left: 0 — full widthdisplay: block (hidden above 1024px with display: none)body.sidebar-open:
transform: translateX(0), overlays content (doesn't push it)position: fixed; inset: 0; background: rgba(0,0,0,0.5) — behind sidebar, above contentHamburger button:
[:button.sidebar-toggle {:hx-on:click "document.body.classList.toggle('sidebar-open')"}
[:iconify-icon {:icon :lucide:menu}]]
Backdrop:
[:div.sidebar-backdrop {:hx-on:click "document.body.classList.toggle('sidebar-open')"}]
Both elements exist in the DOM always but are hidden via CSS above 1024px.
sidebar-open class on <body>sidebar-open class (closes sidebar)classList.toggle pattern already used for user menu expansion| File | Change |
|---|---|
resources/app/public/css/style.css |
CSS variables, transitions, media queries, hamburger/backdrop styles |
resources/admin/public/css/style.css |
Transitions, updated media queries (already has 768px breakpoint, update to 1024px), hamburger/backdrop styles |
src/com/getorcha/app/ui/layout.clj |
Add hamburger button and backdrop div to base function |
src/com/getorcha/admin/ui/layout.clj |
Add hamburger button and backdrop div to admin layout |
nav in app, sidebar in admin) — no structural changesposition: fixed; left: 0; right: 0, works independently of sidebar width<a href> links)