commit 4cb18866b07590b9868d5b2552a7949ef6c6bbac
parent cebe8133c1eca4f7f4f59e837d9b505cec45db8a
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Sat, 19 Sep 2026 05:10:17 +0530
parent cebe8133c1eca4f7f4f59e837d9b505cec45db8a
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Sat, 19 Sep 2026 05:10:17 +0530
Fix: Keep navbar and side panel fixed while scrolling content Update CSS layout to use fixed positioning for the navbar and sticky positioning for the side panel, so only the main content area scrolls. Changes: - Navbar (.bar) now position: fixed at top with z-index: 100 - Body uses flexbox with height: 100vh for proper viewport layout - Main content area has margin-top to account for fixed navbar - Main content scrolls independently with overflow-y: auto - Side panel stays sticky at top with max-height constraint - Side panel can scroll independently if its content exceeds viewport This provides a better UX by keeping navigation and controls visible while allowing long document lists and content to scroll freely. Responsive: Side panel moves below content on screens < 900px width. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/style.css b/www/style.css @@ -4,15 +4,15 @@ --sig: 214, 48, 49; --img: 9, 102, 204; --txt: 34, 139, 84; } * { box-sizing: border-box; } -body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); } +body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); display: flex; flex-direction: column; height: 100vh; } a { color: var(--accent); } -.bar { display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.2rem; background: var(--ink); color: #fff; } +.bar { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.2rem; background: var(--ink); color: #fff; z-index: 100; } .bar a { color: #cfd8e3; text-decoration: none; } .bar a:hover { color: #fff; } .bar .brand { font-weight: 700; letter-spacing: .06em; color: #fff; text-transform: uppercase; } .bar nav { display: flex; gap: 1rem; flex: 1; } #whoami { font-size: 12px; color: #cfd8e3; } -main { padding: 1.2rem; max-width: 1500px; margin: 0 auto; } +main { margin-top: 2.8rem; padding: 1.2rem; max-width: 1500px; margin-left: auto; margin-right: auto; flex: 1; overflow-y: auto; } h1 { font-size: 1.25rem; margin: 0 0 1rem; } h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1.2rem 0 .5rem; } .card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; } @@ -45,7 +45,7 @@ tr.click:hover td { background: #f6f9fc; } /* document workspace */ .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; } @media (max-width: 900px) { .workspace { grid-template-columns: 1fr; } } -.side { position: sticky; top: .8rem; max-height: calc(100vh - 1.6rem); overflow: auto; } +.side { position: sticky; top: 1.2rem; max-height: calc(100vh - 4rem); overflow-y: auto; } .pages { display: flex; flex-direction: column; gap: 1rem; align-items: center; } .page { position: relative; width: 100%; max-width: 1000px; background: #fff; box-shadow: 0 1px 4px rgba(20, 30, 45, .25); line-height: 0; } .page > img { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
: asapien/signet