fix(docs): improve mobile sidebar navigation
The sidebar had all categories expanded by default (collapsed: false), which on mobile created a 60+ item flat list when opening the sidebar. Reported by danny on Discord. Changes: - Set all top-level categories to collapsed: true (tap to expand) - Enable autoCollapseCategories: true (accordion — opening one section closes others, prevents the overwhelming flat list) - Enable hideable sidebar (swipe-to-dismiss on mobile) - Add mobile CSS: larger touch targets (0.75rem padding), bolder category headers, visible subcategory indentation with left border, wider sidebar (85vw / 360px max), darker backdrop overlay
This commit is contained in:
@@ -199,6 +199,46 @@ pre.prism-code.language-ascii code {
|
||||
border: 1px solid rgba(255, 215, 0, 0.08);
|
||||
}
|
||||
|
||||
/* ─── Mobile sidebar improvements ─────────────────────────────────────────── */
|
||||
|
||||
/* Larger touch targets on mobile */
|
||||
@media (max-width: 996px) {
|
||||
.menu__link {
|
||||
padding: 0.6rem 0.75rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.menu__list-item-collapsible > .menu__link {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
padding: 0.75rem 0.75rem;
|
||||
border-bottom: 1px solid rgba(255, 215, 0, 0.06);
|
||||
}
|
||||
|
||||
/* Category caret — more visible */
|
||||
.menu__caret::before {
|
||||
background-size: 1.5rem 1.5rem;
|
||||
}
|
||||
|
||||
/* Indent subcategories clearly */
|
||||
.menu__list .menu__list {
|
||||
padding-left: 0.75rem;
|
||||
border-left: 1px solid rgba(255, 215, 0, 0.06);
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
/* Sidebar overlay — slightly more opaque for readability */
|
||||
.navbar-sidebar__backdrop {
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
/* Sidebar width on mobile — use more of the screen */
|
||||
.navbar-sidebar {
|
||||
width: 85vw;
|
||||
max-width: 360px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hero banner for docs landing if needed */
|
||||
.hero--hermes {
|
||||
background: linear-gradient(135deg, #07070d 0%, #0f0f18 100%);
|
||||
|
||||
Reference in New Issue
Block a user