Sidebar becomes a mobile drawer below 768px
The sidebar was flex:0 0 15rem inside .app__body unconditionally, so on a narrow viewport it and the main content just fought over space. Below 768px it now leaves the flex flow entirely (position: fixed, translated off-canvas by default) and slides in as a drawer instead, leaving .app__main the full width. - App.vue: a ☰ button in the header (hidden above the breakpoint) opens it; a backdrop tap, the drawer's own close button, or any navigation (route.fullPath watcher) closes it. State lives in App.vue since the toggle button is in the header, not the sidebar. - AppSidebar.vue: a close button (✕), only visible in the drawer, emitting 'close'. - Desktop (>=768px) layout and behaviour is untouched -- the drawer CSS and the toggle button both live behind the same media query. Drag-and-drop is untouched, as asked -- this only affects layout, and the sidebar's inbox draggable works the same as before either way. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,15 @@ it also works as a project switcher from anywhere. `<RouterView
|
||||
:key="route.path">` remounts the view on every path change so switching
|
||||
projects always does a fresh load.
|
||||
|
||||
Below `768px` (`style.css`'s one layout breakpoint) the sidebar becomes an
|
||||
off-canvas drawer instead of sitting beside the page: `position: fixed`,
|
||||
translated out of view by default, slid in via a `.sidebar--open` class.
|
||||
`App.vue` owns the `drawerOpen` state -- a `☰` button in the header (hidden
|
||||
above the breakpoint) opens it; a backdrop tap, the drawer's own `✕` (which
|
||||
`AppSidebar` emits `close` for), or any navigation (a `route.fullPath`
|
||||
watcher) closes it. Above the breakpoint `drawerOpen` just goes unused, since
|
||||
nothing renders the button that would set it.
|
||||
|
||||
`/` redirects to `/dashboard` (`DashboardView.vue`): a full-width grid linking
|
||||
to each project (title + card count), with a **"Create a project" tile**
|
||||
styled to match sitting last in the same grid (creating one stays on the
|
||||
|
||||
Reference in New Issue
Block a user