feat(school-detail): map-blended hero, remove at-a-glance stats
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 14s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 52s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 13s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 14s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 52s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 13s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s
Replace the header's at-a-glance stats row with a location map that sits atop the hero and blends into the school title. The map is a static, non-interactive preview (never traps page scroll) with a coral pin; the whole band — or the inline "View on map ↗" link by the address — opens a fullscreen, interactive map. Compare floats glassy over the band. The separate "Location" section (and its nav item) is removed; the map now lives only in the hero. Schools without lat/long render the header with no map band, as before. New: SchoolHeroMap (fullscreen wrapper, forwardRef open handle) + LeafletHeroMapInner (minimal single-school map with interaction toggle). Applied to both primary and secondary detail views; dead heroStats/tone/ mapContainer CSS removed (shared .heroStat* card classes kept). Also drops the orphaned "Latest data" note and does not reintroduce an Ofsted strip in the hero (it would duplicate the Ofsted section directly below). Mockup kept at mockups/header-map-hero.html. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -29,12 +29,15 @@
|
||||
|
||||
/* ── Header ──────────────────────────────────────────── */
|
||||
.header {
|
||||
position: relative;
|
||||
background: var(--bg-card, white);
|
||||
border: 1px solid var(--border-color, #e5dfd5);
|
||||
border-radius: 10px;
|
||||
padding: 1.25rem 1.5rem;
|
||||
/* Padding lives on .headerContent so the map band can bleed to the edges. */
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
box-shadow: var(--shadow-soft);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.headerContent {
|
||||
@@ -42,6 +45,55 @@
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 1.5rem;
|
||||
padding: 1.25rem 1.5rem;
|
||||
}
|
||||
|
||||
/* With a map band above, slide the title up under the fade so map and title
|
||||
read as one object; the Compare button floats glassy over the map. */
|
||||
.headerHasMap .headerContent {
|
||||
padding-top: 0;
|
||||
margin-top: -0.5rem;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.headerHasMap .actions {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 14px;
|
||||
z-index: 6;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.headerHasMap .actions .btnAdd {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
color: var(--accent-coral, #e07256);
|
||||
border-color: transparent;
|
||||
-webkit-backdrop-filter: blur(6px);
|
||||
backdrop-filter: blur(6px);
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
.headerHasMap .actions .btnAdd:hover {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Inline "View on map ↗" trigger next to the address. */
|
||||
.mapLink {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
color: var(--accent-coral, #e07256);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mapLink:hover {
|
||||
color: var(--accent-coral-dark, #c45a3f);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
.titleSection {
|
||||
@@ -414,13 +466,6 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mapContainer {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ── History table ───────────────────────────────────── */
|
||||
.tableWrapper {
|
||||
overflow-x: auto;
|
||||
@@ -725,70 +770,7 @@
|
||||
color: var(--text-primary, #1a1612);
|
||||
}
|
||||
|
||||
/* Hero tone system — colour tokens applied to the scorecard's serif Ofsted
|
||||
number (colour only), independent of the .ofstedGrade{N} badges. */
|
||||
.tone-teal {
|
||||
--hero-tone: var(--accent-teal, #2d7d7d);
|
||||
}
|
||||
.tone-green {
|
||||
--hero-tone: #3c8c3c;
|
||||
}
|
||||
.tone-gold {
|
||||
--hero-tone: var(--accent-gold, #c9a227);
|
||||
}
|
||||
.tone-coral {
|
||||
--hero-tone: var(--accent-coral, #e07256);
|
||||
}
|
||||
.tone-neutral {
|
||||
--hero-tone: var(--text-muted, #8a847a);
|
||||
}
|
||||
|
||||
/* ── Hero at-a-glance stats ──────────────────────────── */
|
||||
.heroStats {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1.25rem 3rem;
|
||||
margin-top: 1.5rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 1px solid var(--border-color, #e5dfd5);
|
||||
}
|
||||
|
||||
.heroStat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.35rem;
|
||||
min-width: 0;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.heroStatNumber,
|
||||
.heroStatNumberSerif {
|
||||
font-family: var(--font-playfair), "Playfair Display", serif;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: var(--text-primary, #1a1612);
|
||||
min-height: clamp(2rem, 4vw, 2.75rem);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.heroStatNumber {
|
||||
font-size: clamp(2rem, 4vw, 2.75rem);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.heroStatNumberSerif {
|
||||
font-size: clamp(1.75rem, 3.5vw, 2.25rem);
|
||||
}
|
||||
|
||||
.heroStatNumberSerif.tone-teal,
|
||||
.heroStatNumberSerif.tone-green,
|
||||
.heroStatNumberSerif.tone-gold,
|
||||
.heroStatNumberSerif.tone-coral,
|
||||
.heroStatNumberSerif.tone-neutral {
|
||||
color: var(--hero-tone);
|
||||
}
|
||||
|
||||
/* .heroStatLabel is shared by the GCSE / Pupils stat cards below. */
|
||||
.heroStatLabel {
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 600;
|
||||
@@ -797,17 +779,6 @@
|
||||
color: var(--text-secondary, #5c564d);
|
||||
}
|
||||
|
||||
.heroStatFoot {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
}
|
||||
|
||||
.heroDataNote {
|
||||
margin: 0.5rem 0 0;
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
}
|
||||
|
||||
/* ── GCSE hero stat cards (mirrors primary heroStatCard) ─ */
|
||||
.heroStatGrid {
|
||||
display: grid;
|
||||
@@ -1138,10 +1109,6 @@
|
||||
.admissionsTypeBadge {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.heroStats {
|
||||
gap: 1rem 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
|
||||
Reference in New Issue
Block a user