mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
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:
parent
f93637b3a1
commit
bd376fe976
3 changed files with 49 additions and 3 deletions
|
|
@ -65,6 +65,12 @@ const config: Config = {
|
|||
defaultMode: 'dark',
|
||||
respectPrefersColorScheme: true,
|
||||
},
|
||||
docs: {
|
||||
sidebar: {
|
||||
hideable: true,
|
||||
autoCollapseCategories: true,
|
||||
},
|
||||
},
|
||||
navbar: {
|
||||
title: 'Hermes Agent',
|
||||
logo: {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const sidebars: SidebarsConfig = {
|
|||
{
|
||||
type: 'category',
|
||||
label: 'Getting Started',
|
||||
collapsed: false,
|
||||
collapsed: true,
|
||||
items: [
|
||||
'getting-started/quickstart',
|
||||
'getting-started/installation',
|
||||
|
|
@ -17,7 +17,7 @@ const sidebars: SidebarsConfig = {
|
|||
{
|
||||
type: 'category',
|
||||
label: 'Guides & Tutorials',
|
||||
collapsed: false,
|
||||
collapsed: true,
|
||||
items: [
|
||||
'guides/tips',
|
||||
'guides/daily-briefing-bot',
|
||||
|
|
@ -32,7 +32,7 @@ const sidebars: SidebarsConfig = {
|
|||
{
|
||||
type: 'category',
|
||||
label: 'User Guide',
|
||||
collapsed: false,
|
||||
collapsed: true,
|
||||
items: [
|
||||
'user-guide/cli',
|
||||
'user-guide/configuration',
|
||||
|
|
|
|||
|
|
@ -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%);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue