feat(school-detail): move Back to a standalone link, dock "Back to top" in the nav

Replicate the Autotrader pattern: pull the page-back control out of the
sticky section-nav bar and place a standalone "← Back" text link above the
header card, on the page background, where it scrolls away with the page.
It keeps the context-aware behaviour (router.back → /search fallback); the
secondary view gains the same fallback for parity (it previously used a bare
router.back() that dead-ends on deep links).

The pinned slot the Back button vacated now holds a "↑ Top" control that
smooth-scrolls to the top, so the sticky bar keeps a useful affordance.
Applies to both primary and secondary detail views.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tudor
2026-07-01 14:48:17 +01:00
co-authored by Claude Opus 4.8
parent ce2bfea91b
commit 14474eccf1
4 changed files with 81 additions and 4 deletions
@@ -4,6 +4,29 @@
width: 100%;
}
/* Standalone back link, sits above the header card on the page background. */
.topBack {
display: inline-flex;
align-items: center;
gap: 0.4rem;
margin: 0 0 0.75rem;
padding: 0.25rem 0;
font-size: 1.0625rem;
font-weight: 600;
color: var(--accent-coral, #e07256);
background: none;
border: none;
cursor: pointer;
line-height: 1.2;
transition: color 0.15s ease;
}
.topBack:hover {
color: var(--accent-coral-dark, #c85a3e);
text-decoration: underline;
text-underline-offset: 2px;
}
/* ── Header ──────────────────────────────────────────── */
.header {
background: var(--bg-card, white);