fix: collapse the navbar into a menu on small screens #4
Loading…
Reference in a new issue
No description provided.
Delete branch "jtk/mobile-nav"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes GitHub #36 (old mirror): on a phone the top bar's links ran wider than the screen, which dragged pages like the batch scanner wider too.
What changed
lg, the links collapse into a hamburger dropdown (#mobile-nav) with the same items (Home, Library, Add Book, Admin, account settings, theme, log out; or Log in / Register). Desktop is unchanged. Links are shared function components, so the two menus can't drift.<.header>: actions wrap under the title on narrow screens.grid-cols-1so they can shrink, users table scrolls inside its card.Testing
/,/books,/books/new,/books/batch-scanner,/admin,/admin/users,/admin/settings,/admin/import-export,/users/settings(before:/was 694px wide).mix precommit: 150 passed.Review from Nye (approved) — nav_links/account_links/guest_links remove the duplication, mobile dropdown has aria-label, no duplicate DOM ids (theme_toggle uses data attrs only), tests check guest vs signed-in links. Optional nit: in the mobile menu, Register keeps btn btn-primary, which looks heavy inside a menu list; fine to leave.