diff --git a/steward/templates/base.html b/steward/templates/base.html index 7b7a95d..2fdd8ea 100644 --- a/steward/templates/base.html +++ b/steward/templates/base.html @@ -51,37 +51,76 @@ code { font-family: ui-monospace, monospace; font-size: 0.875em; background: var radial-gradient(ellipse 50% 40% at 20% 80%, rgba(200, 168, 64, 0.025) 0%, transparent 65%); } -/* Nav */ -nav { - background: var(--bg-card); - padding: 0 1.5rem; - display: flex; - align-items: center; - gap: 0; - border-bottom: 1px solid var(--border-mid); - height: 48px; - position: relative; - z-index: 10; +/* ── App shell: persistent left sidebar + content column ───────────────────── */ +.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; } +.sidebar { + width: 220px; flex-shrink: 0; background: var(--bg-card); + border-right: 1px solid var(--border-mid); + display: flex; flex-direction: column; + position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 20; } -nav .brand { - font-family: var(--font-serif); - font-weight: 700; - font-size: 1.1rem; - margin-right: 2rem; - letter-spacing: 0.01em; - display: flex; - align-items: center; - gap: 0.45rem; - color: var(--gold); - text-decoration: none; +.sidebar .brand { + font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; + letter-spacing: 0.01em; color: var(--gold); text-decoration: none; + display: flex; align-items: center; gap: 0.5rem; + padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); } -nav .brand svg { flex-shrink: 0; } -nav a { color: var(--text-muted); font-size: 0.875rem; padding: 0 0.875rem; height: 48px; display: flex; align-items: center; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; } -nav a:hover { color: var(--text); border-bottom-color: var(--border-mid); } -nav a.nav-end { margin-left: auto; } +.sidebar .brand svg { flex-shrink: 0; } +.side-nav { flex: 1; padding: 0.75rem 0; } +.nav-group { margin-bottom: 0.9rem; } +.nav-group-label { + font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em; + color: var(--text-dim); font-weight: 600; padding: 0 1.25rem; margin-bottom: 0.3rem; +} +.side-nav a { + display: flex; align-items: center; gap: 0.5rem; + padding: 0.4rem 1.25rem; font-size: 0.9rem; color: var(--text-muted); + border-left: 2px solid transparent; text-decoration: none; + transition: color .12s, background .12s, border-color .12s; +} +.side-nav a:hover { color: var(--text); background: var(--bg-elevated); } +.side-nav a.active { + color: var(--gold); border-left-color: var(--gold); + background: color-mix(in srgb, var(--gold) 8%, transparent); +} +.side-user { border-top: 1px solid var(--border); padding: 0.7rem 1.25rem; } +.side-user a { + color: var(--text-muted); font-size: 0.84rem; text-decoration: none; + display: flex; align-items: center; gap: 0.4rem; +} +.side-user a:hover { color: var(--text); } +.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } +.topbar { display: none; } /* slim mobile bar; shown only under 900px */ +.nav-scrim { display: none; } /* Layout */ -main { padding: 1.5rem 2rem; max-width: 1600px; margin: 0 auto; width: 100%; box-sizing: border-box; position: relative; z-index: 1; } +main { padding: 1.5rem 2rem; max-width: 1400px; margin: 0 auto; width: 100%; box-sizing: border-box; position: relative; z-index: 1; } + +/* Responsive: sidebar slides off-canvas under 900px, toggled by ☰ */ +@media (max-width: 900px) { + .sidebar { + position: fixed; left: 0; top: 0; bottom: 0; height: 100%; + transform: translateX(-100%); transition: transform .2s ease; + box-shadow: 0 0 30px rgba(0,0,0,0.5); + } + body.nav-open .sidebar { transform: translateX(0); } + .topbar { + display: flex; align-items: center; gap: 0.75rem; height: 48px; padding: 0 1rem; + background: var(--bg-card); border-bottom: 1px solid var(--border-mid); + position: sticky; top: 0; z-index: 15; + } + .sidebar-toggle { + background: none; border: none; color: var(--text-muted); font-size: 1.3rem; + cursor: pointer; line-height: 1; padding: 0.25rem; + } + .topbar .brand-sm { + font-family: var(--font-serif); color: var(--gold); font-weight: 700; + font-size: 1.05rem; text-decoration: none; + } + body.nav-open .nav-scrim { + display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 18; + } +} /* Alerts */ .alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; } @@ -224,8 +263,10 @@ body.dash-editing .widget-drawer { transform:translateY(0); }
+{% set _p = request.path %} +
{% if session.user_id is defined %} - + +
+ ⏻ {{ session.username }} +
+ +{% endif %} +
+{% if session.user_id is defined %} +
+ + Steward +
{% endif %}