feat(row): redesign to clean 3-line layout with stats on second row
Line 1: school name (bold) + school type (muted gray) Line 2: R,W&M % · Progress score + band · Pupil count Line 3: local authority · distance (location searches) Actions (View / Add) are vertically centred on the right across all lines. Progress uses reading score, falling back to writing then maths. Removed the old nameScore grouping and separate meta/progress rows in favour of the cleaner 3-line structure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
background: var(--bg-card, white);
|
||||
border: 1px solid var(--border-color, #e5dfd5);
|
||||
border-left: 3px solid transparent;
|
||||
border-radius: 8px;
|
||||
padding: 0.875rem 1rem;
|
||||
padding: 0.75rem 1rem;
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||
animation: rowFadeIn 0.3s ease-out both;
|
||||
}
|
||||
@@ -20,37 +22,24 @@
|
||||
}
|
||||
|
||||
@keyframes rowFadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
from { opacity: 0; transform: translateY(6px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.rowMain {
|
||||
/* ── Left content column ─────────────────────────────── */
|
||||
.rowContent {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
/* Line 1: name+score on the left, actions pinned right */
|
||||
.rowTop {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
/* Name + score grouped together on the left */
|
||||
.nameScore {
|
||||
/* Line 1: name + type */
|
||||
.line1 {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 0.75rem;
|
||||
flex: 1;
|
||||
gap: 0.625rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@@ -62,65 +51,89 @@
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
min-width: 0;
|
||||
flex-shrink: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.schoolName:hover {
|
||||
color: var(--accent-coral, #e07256);
|
||||
}
|
||||
|
||||
/* Score block: value + label inline */
|
||||
.scoreBlock {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 0.3rem;
|
||||
flex-shrink: 0;
|
||||
.schoolType {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.scoreValue {
|
||||
font-size: 1.0625rem;
|
||||
/* Line 2: stats */
|
||||
.line2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0 1.25rem;
|
||||
}
|
||||
|
||||
.stat {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.statValue {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary, #1a1612);
|
||||
font-family: var(--font-playfair), 'Playfair Display', serif;
|
||||
line-height: 1.2;
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.scoreNA {
|
||||
font-size: 1rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
}
|
||||
|
||||
.scoreLabel {
|
||||
.statLabel {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Trend arrow */
|
||||
/* Trend arrows */
|
||||
.trend {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-left: 2px;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
.trendUp {
|
||||
color: var(--accent-teal, #2d7d7d);
|
||||
}
|
||||
.trendUp { color: var(--accent-teal, #2d7d7d); }
|
||||
.trendDown { color: var(--accent-coral, #e07256); }
|
||||
.trendStable { color: var(--text-muted, #8a847a); }
|
||||
|
||||
.trendDown {
|
||||
color: var(--accent-coral, #e07256);
|
||||
}
|
||||
|
||||
.trendStable {
|
||||
/* Line 3: location */
|
||||
.line3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0 0;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
}
|
||||
|
||||
/* Action buttons — pinned right, slightly larger on desktop */
|
||||
.line3 span:not(:last-child)::after {
|
||||
content: '·';
|
||||
margin: 0 0.4rem;
|
||||
color: var(--border-color, #e5dfd5);
|
||||
}
|
||||
|
||||
.distanceBadge {
|
||||
display: inline-block;
|
||||
padding: 0.0625rem 0.375rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
background: var(--accent-teal, #2d7d7d);
|
||||
color: white;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* ── Right actions column ────────────────────────────── */
|
||||
.rowActions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -128,7 +141,7 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Equalise <a> and <button> rendering */
|
||||
/* Equalise <a> and <button> */
|
||||
.rowActions > * {
|
||||
height: 2rem;
|
||||
line-height: 1;
|
||||
@@ -198,102 +211,33 @@
|
||||
color: var(--text-primary, #1a1612);
|
||||
}
|
||||
|
||||
/* Line 2: Meta tags */
|
||||
.rowMeta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.25rem 0;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
}
|
||||
|
||||
.rowMeta span:not(:last-child)::after {
|
||||
content: '·';
|
||||
margin: 0 0.4rem;
|
||||
color: var(--border-color, #e5dfd5);
|
||||
}
|
||||
|
||||
.distanceBadge {
|
||||
display: inline-block;
|
||||
padding: 0.0625rem 0.375rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
background: var(--accent-teal, #2d7d7d);
|
||||
color: white;
|
||||
border-radius: 3px;
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
|
||||
/* Line 3: Progress scores */
|
||||
.rowProgress {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem 1rem;
|
||||
margin-top: 0.125rem;
|
||||
}
|
||||
|
||||
.progressItem {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-secondary, #5c564d);
|
||||
}
|
||||
|
||||
.progressValue {
|
||||
color: var(--text-primary, #1a1612);
|
||||
margin: 0 0.25rem;
|
||||
}
|
||||
|
||||
.progressBand {
|
||||
font-style: normal;
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted, #8a847a);
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
/* ── Mobile ──────────────────────────────────────────── */
|
||||
@media (max-width: 640px) {
|
||||
.row {
|
||||
padding: 0.75rem;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.rowTop {
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem;
|
||||
gap: 0.625rem;
|
||||
}
|
||||
|
||||
/* School name takes full width, score+actions wrap below */
|
||||
.nameScore {
|
||||
.rowContent {
|
||||
flex-basis: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.schoolName {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* Score block stays inline with label visible */
|
||||
.scoreBlock {
|
||||
align-items: baseline;
|
||||
.line2 {
|
||||
gap: 0 1rem;
|
||||
}
|
||||
|
||||
.scoreLabel {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
/* Actions move to end of the wrapped row */
|
||||
.rowActions {
|
||||
margin-left: auto;
|
||||
width: 100%;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.btnView,
|
||||
.btnCompare,
|
||||
.btnRemove {
|
||||
padding: 0.4375rem 0.875rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.rowProgress {
|
||||
gap: 0.375rem 0.75rem;
|
||||
.rowActions > * {
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user