From 89a95f18853b49617738e06226bb24e612cd59b4 Mon Sep 17 00:00:00 2001 From: Aneurin Barker Snook Date: Fri, 4 Sep 2026 20:54:18 +0100 Subject: [PATCH] Sidebar becomes a mobile drawer below 768px MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- web/README.md | 9 ++++ web/src/App.vue | 31 +++++++++-- web/src/components/AppSidebar.vue | 7 +++ web/src/style.css | 90 +++++++++++++++++++++++++++++++ 4 files changed, 134 insertions(+), 3 deletions(-) diff --git a/web/README.md b/web/README.md index 5bfef98..f70945e 100644 --- a/web/README.md +++ b/web/README.md @@ -58,6 +58,15 @@ it also works as a project switcher from anywhere. `` 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 diff --git a/web/src/App.vue b/web/src/App.vue index 5322d62..10dda13 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -1,5 +1,5 @@