From 5092e7e0154746c2a5735bbc3ae6f504f07e3191 Mon Sep 17 00:00:00 2001 From: M Dombaugh Date: Sun, 1 Mar 2026 21:36:51 +0000 Subject: [PATCH] feat: mobile bottom navigation bar 5-item fixed bottom bar (Dashboard, Focus, Tasks, Calendar, More) visible only on mobile (<768px). "More" opens a slide-up panel with links to Notes, Meetings, Decisions, Contacts, Weblinks, Admin. Active page highlighted with accent color. Desktop unaffected. Co-Authored-By: Claude Opus 4.6 --- static/app.js | 7 +++ static/style.css | 119 +++++++++++++++++++++++++++++++++++++++++++- templates/base.html | 55 ++++++++++++++++++++ 3 files changed, 180 insertions(+), 1 deletion(-) diff --git a/static/app.js b/static/app.js index 7da8477..808ab82 100644 --- a/static/app.js +++ b/static/app.js @@ -170,6 +170,13 @@ function escHtml(s) { } +// ---- Mobile More Panel ---- + +function toggleMobileMore() { + const panel = document.getElementById('mobile-more-panel'); + if (panel) panel.classList.toggle('open'); +} + // ---- Timer Pill (topbar running timer) ---- let timerStartAt = null; diff --git a/static/style.css b/static/style.css index 9694ede..8687752 100644 --- a/static/style.css +++ b/static/style.css @@ -1019,13 +1019,130 @@ a:hover { color: var(--accent-hover); } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--muted); } +/* ---- Mobile Bottom Nav ---- */ +.mobile-bottom-bar { + display: none; + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 56px; + background: var(--surface); + border-top: 1px solid var(--border); + z-index: 200; + align-items: center; + justify-content: space-around; + padding: 0 4px; + padding-bottom: env(safe-area-inset-bottom, 0); +} + +.mobile-nav-item { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 2px; + flex: 1; + padding: 6px 0; + color: var(--muted); + text-decoration: none; + background: none; + border: none; + font-family: var(--font-body); + cursor: pointer; + transition: color var(--transition); + -webkit-tap-highlight-color: transparent; +} + +.mobile-nav-item svg { + width: 24px; + height: 24px; +} + +.mobile-nav-item span { + font-size: 10px; + font-weight: 500; + line-height: 1; +} + +.mobile-nav-item.active { + color: var(--accent); +} + +/* Mobile More Panel */ +.mobile-more-panel { + display: none; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 199; +} + +.mobile-more-panel.open { + display: block; +} + +.mobile-more-backdrop { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.4); +} + +.mobile-more-content { + position: absolute; + bottom: 56px; + left: 0; + right: 0; + background: var(--surface); + border-top: 1px solid var(--border); + border-radius: var(--radius-lg) var(--radius-lg) 0 0; + padding: 8px 0; + transform: translateY(100%); + transition: transform 200ms ease; + padding-bottom: env(safe-area-inset-bottom, 0); +} + +.mobile-more-panel.open .mobile-more-content { + transform: translateY(0); +} + +.mobile-more-item { + display: flex; + align-items: center; + gap: 12px; + padding: 12px 20px; + color: var(--text); + text-decoration: none; + font-size: 0.92rem; + font-weight: 500; + transition: background var(--transition); +} + +.mobile-more-item:hover { + background: var(--surface2); + color: var(--text); +} + +.mobile-more-item svg { + width: 20px; + height: 20px; + color: var(--muted); + flex-shrink: 0; +} + /* ---- Responsive ---- */ @media (max-width: 768px) { .sidebar { display: none; } .main-content { margin-left: 0; } .form-grid { grid-template-columns: 1fr; } .dashboard-grid { grid-template-columns: 1fr; } - .page-content { padding: 16px; } + .page-content { padding: 16px; padding-bottom: 72px; } + .mobile-bottom-bar { display: flex; } } .search-type-appointments { background: var(--amber-soft); color: var(--amber); } diff --git a/templates/base.html b/templates/base.html index 6bcc813..37c6e74 100644 --- a/templates/base.html +++ b/templates/base.html @@ -165,6 +165,61 @@ + + + + + +