diff --git a/assets/overlay.js b/assets/overlay.js index 137ca14..6008f37 100644 --- a/assets/overlay.js +++ b/assets/overlay.js @@ -26,7 +26,7 @@ closeBtn = document.createElement('button'); closeBtn.type = 'button'; - closeBtn.className = 'btn btn-fab overlay-close'; + closeBtn.className = 'btn overlay-close'; closeBtn.title = 'Close'; closeBtn.setAttribute('aria-label', 'Close'); closeBtn.textContent = '×'; @@ -35,11 +35,6 @@ bodyEl = document.createElement('div'); bodyEl.className = 'overlay-body'; - // Any navigation or anchor activation inside a rail dismisses the - // overlay: tree/calendar links navigate away, TOC links scroll the - // page underneath — either way the user should see the result, and - // closing synchronously (before navigation) avoids a bfcache snapshot - // that would restore the overlay open on back-nav. bodyEl.addEventListener('click', function (e) { if (e.target.closest('a')) close(); }); diff --git a/assets/page/main.html b/assets/page/main.html index 2df335e..0c4f71c 100644 --- a/assets/page/main.html +++ b/assets/page/main.html @@ -2,12 +2,12 @@ {{define "headerActions"}}{{if .CanEdit}} -EDIT {{if not .IsRoot}} {{end}} +EDIT {{end}}{{end}} {{define "content"}} diff --git a/assets/style.css b/assets/style.css index ada662a..6c193a3 100644 --- a/assets/style.css +++ b/assets/style.css @@ -217,23 +217,9 @@ footer { padding: 0.3rem var(--space-3); white-space: nowrap; } -.btn-fab { - background: var(--bg-panel); - border: var(--border); - width: 3rem; - height: 3rem; - font-size: 1.5rem; - line-height: 1; - display: inline-flex; - align-items: center; - justify-content: center; -} -.btn-fab::before, .btn-fab::after { content: none; } -.btn-fab:hover { background: var(--bg-panel-hover); color: var(--primary-hover); } .btn[hidden] {display: none;} .danger { color: var(--danger); } .danger:hover { color: var(--danger-hover); } -/* Selected segmented-toggle button (view-settings modal). */ .btn.is-active { color: var(--primary-hover); } /* === Form controls === @@ -685,7 +671,13 @@ aside.sidebar:empty { display: none; } border-bottom: var(--border-dashed); flex-shrink: 0; } -.overlay-close { width: 2.5rem; height: 2.5rem; font-size: 1.5rem; } +.overlay-close { + width: 2.5rem; + height: 2.5rem; + font-size: 1.5rem; +} +.overlay-close::before, .overlay-close::after { content: none; } +.overlay-close:hover { background: var(--bg-panel-hover); color: var(--primary-hover); } .overlay-body { flex: 1; overflow-y: auto; @@ -749,12 +741,7 @@ aside.sidebar:empty { display: none; } } .tree-row.is-active > .tree-name { color: var(--primary-hover); } -/* === Tree sidebar (persistent left navigation rail) === - Reuses the .tree-row / .tree-children / .tree-name / .tree-chevron modules. - Desktop: a full-height flex column in the app-shell (composes with .col) - holding the tree's own scroll region. Mobile: not laid out inline — its - content is surfaced through the Overlay via the stacked FABs (see - responsive). */ +/* Tree sidebar (persistent navigation) */ .tree-sidebar { width: var(--tree-width); flex-shrink: 0; @@ -845,13 +832,7 @@ aside.sidebar:empty { display: none; } /* === Responsive === */ @media (max-width: 1100px) { - /* Rails are not laid out inline on mobile — their content is surfaced - through the Overlay via the stacked FABs. The