Addresses 28 issues identified in UX audit (P0–P3 severity): P0 — Critical: - Fix compare URL sharing: seed ComparisonContext from SSR initialData when localStorage is empty, making /compare?urns=... links shareable - Remove permanently broken "Avg. Scaled Score" column from school detail historical data table P1 — High priority: - Add radius selector (0.5–10 mi) to postcode search in FilterBar - Make Add to Compare a toggle (remove) on SchoolCards - Hide hero title/description once a search is active - Show school count + quick-search prompts on empty landing page - Compare empty state opens in-page school search modal directly - Remove URN from school detail header (irrelevant to end users) - Move map above performance chart in school detail page - Add ← Back navigation to school detail page - Add sort controls to search results (RWM%, distance, A–Z) - Show metric descriptions below metric selector - Expand ComparisonToast to list school names with per-school remove - Add progress score explainer (0 = national average) throughout P2 — Medium: - Remove console.log statements from ComparisonView - Colour-code comparison school cards to match chart line colours - Replace plain loading text with LoadingSkeleton in ComparisonView - Rankings empty state uses shared EmptyState component - Rankings year filter shows actual year e.g. "2023 (Latest)" - Rankings subtitle shows top-N count - Add View link alongside Add button in rankings table - Remove placeholder Privacy Policy / Terms links from footer - Replace untappable 10px info icons with visible metric hint text - Show active filter chips in search results header P3 — Polish: - Remove redundant "Home" nav link (logo already links home) - Add / and Ctrl+K keyboard shortcut to focus search input - Add Share button to compare page (copies URL to clipboard) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
445 lines
8.5 KiB
CSS
445 lines
8.5 KiB
CSS
.container {
|
|
width: 100%;
|
|
}
|
|
|
|
/* Header */
|
|
.header {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.headerContent {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: 2rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 2.25rem;
|
|
font-weight: 700;
|
|
color: var(--text-primary, #1a1612);
|
|
margin-bottom: 0.5rem;
|
|
font-family: var(--font-playfair), 'Playfair Display', serif;
|
|
}
|
|
|
|
.subtitle {
|
|
font-size: 1rem;
|
|
color: var(--text-secondary, #5c564d);
|
|
margin: 0;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.addButton {
|
|
padding: 0.75rem 1.5rem;
|
|
font-size: 0.9375rem;
|
|
font-weight: 600;
|
|
background: var(--accent-coral, #e07256);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.addButton:hover {
|
|
background: var(--accent-coral-dark, #c45a3f);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(224, 114, 86, 0.3);
|
|
}
|
|
|
|
/* Metric Selector */
|
|
.metricSelector {
|
|
background: var(--bg-card, white);
|
|
border: 1px solid var(--border-color, #e5dfd5);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
|
|
}
|
|
|
|
.metricLabel {
|
|
font-size: 0.9375rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary, #1a1612);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.metricSelect {
|
|
flex: 1;
|
|
max-width: 400px;
|
|
padding: 0.625rem 1rem;
|
|
font-size: 0.9375rem;
|
|
border: 1px solid var(--border-color, #e5dfd5);
|
|
border-radius: 8px;
|
|
background: var(--bg-card, white);
|
|
color: var(--text-primary, #1a1612);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.metricSelect:hover {
|
|
border-color: var(--accent-coral, #e07256);
|
|
}
|
|
|
|
.metricSelect:focus {
|
|
outline: none;
|
|
border-color: var(--accent-coral, #e07256);
|
|
box-shadow: 0 0 0 3px rgba(224, 114, 86, 0.15);
|
|
}
|
|
|
|
.metricSelect optgroup {
|
|
font-weight: 700;
|
|
color: var(--text-primary, #1a1612);
|
|
background: var(--bg-secondary, #f3ede4);
|
|
padding: 0.5rem 0;
|
|
}
|
|
|
|
.metricSelect option {
|
|
font-weight: 400;
|
|
color: var(--text-secondary, #5c564d);
|
|
padding: 0.375rem 1rem;
|
|
}
|
|
|
|
/* Schools Section */
|
|
.schoolsSection {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.schoolsGrid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.schoolCard {
|
|
background: var(--bg-card, white);
|
|
border: 1px solid var(--border-color, #e5dfd5);
|
|
border-left: 3px solid var(--accent-teal, #2d7d7d);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
position: relative;
|
|
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.schoolCard:hover {
|
|
box-shadow: var(--shadow-medium, 0 4px 20px rgba(26, 22, 18, 0.1));
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.removeButton {
|
|
position: absolute;
|
|
top: 0.75rem;
|
|
right: 0.75rem;
|
|
width: 28px;
|
|
height: 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--accent-coral, #e07256);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 50%;
|
|
font-size: 1.25rem;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.removeButton:hover {
|
|
background: var(--accent-coral-dark, #c45a3f);
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.schoolName {
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
margin-bottom: 0.75rem;
|
|
padding-right: 2rem;
|
|
line-height: 1.3;
|
|
font-family: var(--font-playfair), 'Playfair Display', serif;
|
|
}
|
|
|
|
.schoolName a {
|
|
color: var(--text-primary, #1a1612);
|
|
text-decoration: none;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.schoolName a:hover {
|
|
color: var(--accent-coral, #e07256);
|
|
}
|
|
|
|
.schoolMeta {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
flex: 1;
|
|
}
|
|
|
|
.metaItem {
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary, #5c564d);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.latestValue {
|
|
margin-top: auto;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--border-color, #e5dfd5);
|
|
text-align: center;
|
|
background: var(--bg-secondary, #f3ede4);
|
|
margin-left: -1.5rem;
|
|
margin-right: -1.5rem;
|
|
margin-bottom: -1.5rem;
|
|
padding: 1.25rem 1.5rem;
|
|
border-radius: 0 0 12px 9px;
|
|
}
|
|
|
|
.latestLabel {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted, #8a847a);
|
|
margin-bottom: 0.25rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.latestNumber {
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
color: var(--accent-teal, #2d7d7d);
|
|
}
|
|
|
|
/* Chart Section */
|
|
.chartSection {
|
|
background: var(--bg-card, white);
|
|
border: 1px solid var(--border-color, #e5dfd5);
|
|
border-radius: 12px;
|
|
padding: 2rem;
|
|
margin-bottom: 2rem;
|
|
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
|
|
}
|
|
|
|
.sectionTitle {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary, #1a1612);
|
|
margin-bottom: 1.5rem;
|
|
padding-bottom: 0.75rem;
|
|
border-bottom: 2px solid var(--border-color, #e5dfd5);
|
|
font-family: var(--font-playfair), 'Playfair Display', serif;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.sectionTitle::before {
|
|
content: '';
|
|
display: inline-block;
|
|
width: 4px;
|
|
height: 1em;
|
|
background: var(--accent-coral, #e07256);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.chartContainer {
|
|
width: 100%;
|
|
height: 400px;
|
|
position: relative;
|
|
}
|
|
|
|
.loadingMessage {
|
|
text-align: center;
|
|
padding: 3rem;
|
|
color: var(--text-secondary, #5c564d);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
/* Table Section */
|
|
.tableSection {
|
|
background: var(--bg-card, white);
|
|
border: 1px solid var(--border-color, #e5dfd5);
|
|
border-radius: 12px;
|
|
padding: 2rem;
|
|
margin-bottom: 2rem;
|
|
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
|
|
}
|
|
|
|
.tableWrapper {
|
|
overflow-x: auto;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.comparisonTable {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.9375rem;
|
|
}
|
|
|
|
.comparisonTable thead {
|
|
background: var(--bg-secondary, #f3ede4);
|
|
}
|
|
|
|
.comparisonTable th {
|
|
padding: 1rem;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
color: var(--text-primary, #1a1612);
|
|
border-bottom: 2px solid var(--border-color, #e5dfd5);
|
|
white-space: nowrap;
|
|
text-transform: uppercase;
|
|
font-size: 0.75rem;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.comparisonTable td {
|
|
padding: 1rem;
|
|
border-bottom: 1px solid var(--border-color, #e5dfd5);
|
|
color: var(--text-secondary, #5c564d);
|
|
text-align: left;
|
|
}
|
|
|
|
.comparisonTable tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.comparisonTable tbody tr:hover {
|
|
background: var(--bg-secondary, #f3ede4);
|
|
}
|
|
|
|
.yearCell {
|
|
font-weight: 700;
|
|
color: var(--accent-gold, #c9a227);
|
|
}
|
|
|
|
/* Empty State */
|
|
.emptyState {
|
|
text-align: center;
|
|
padding: 4rem 2rem;
|
|
background: var(--bg-card, white);
|
|
border: 1px solid var(--border-color, #e5dfd5);
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.emptyStateTitle {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary, #1a1612);
|
|
margin-bottom: 0.5rem;
|
|
font-family: var(--font-playfair), 'Playfair Display', serif;
|
|
}
|
|
|
|
.emptyStateDescription {
|
|
font-size: 1rem;
|
|
color: var(--text-secondary, #5c564d);
|
|
max-width: 400px;
|
|
margin: 0 auto 1.5rem;
|
|
}
|
|
|
|
.metricDescription {
|
|
margin-top: 0.5rem;
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
max-width: 600px;
|
|
flex-basis: 100%;
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
.progressNote {
|
|
background: var(--bg-secondary);
|
|
border-left: 3px solid var(--accent-teal);
|
|
padding: 0.75rem 1rem;
|
|
margin: 0 0 1.5rem;
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
|
|
}
|
|
|
|
.shareButton {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.375rem;
|
|
padding: 0.5rem 1rem;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-color, #e0ddd8);
|
|
border-radius: var(--radius-md);
|
|
color: var(--text-secondary);
|
|
font-size: 0.875rem;
|
|
cursor: pointer;
|
|
transition: all var(--transition);
|
|
}
|
|
|
|
.shareButton:hover {
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.headerContent {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.addButton {
|
|
width: 100%;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.75rem;
|
|
}
|
|
|
|
.metricSelector {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.metricSelect {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.schoolsGrid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.chartSection,
|
|
.tableSection {
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.chartContainer {
|
|
height: 300px;
|
|
}
|
|
|
|
.comparisonTable {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.comparisonTable th,
|
|
.comparisonTable td {
|
|
padding: 0.75rem 0.5rem;
|
|
}
|
|
|
|
.latestValue {
|
|
margin-left: -1rem;
|
|
margin-right: -1rem;
|
|
margin-bottom: -1rem;
|
|
padding: 1rem;
|
|
border-radius: 0 0 8px 5px;
|
|
}
|
|
}
|