Files
school_compare/nextjs-app/components/HomeView.module.css
Tudor 2b808959c5
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 34s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
style(ux): make filter bar full width to align with layout
2026-03-05 09:40:37 +00:00

542 lines
10 KiB
CSS

.homeView {
width: 100%;
}
.heroSection {
text-align: center;
margin-bottom: 2rem;
padding-top: 1rem;
}
.heroTitle {
font-size: 2.5rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
margin-bottom: 0.5rem;
line-height: 1.2;
font-family: var(--font-playfair), 'Playfair Display', serif;
}
.heroDescription {
font-size: 1.1rem;
color: var(--text-secondary, #5c564d);
margin: 0 auto;
max-width: 600px;
}
@media (max-width: 768px) {
.heroTitle {
font-size: 1.75rem;
}
.heroDescription {
font-size: 1rem;
}
}
.locationBannerWrapper {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
margin-bottom: 1rem;
flex-wrap: wrap;
}
.locationBanner {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: rgba(45, 125, 125, 0.1);
border: 1px solid rgba(45, 125, 125, 0.3);
border-radius: 8px;
font-size: 0.875rem;
color: var(--accent-teal, #2d7d7d);
font-weight: 500;
}
.locationIcon {
font-size: 1.25rem;
color: var(--accent-teal, #2d7d7d);
}
/* View Toggle */
.viewToggle {
display: flex;
gap: 0.2rem;
background: var(--bg-secondary, #f3ede4);
padding: 0.2rem;
border-radius: 6px;
}
.viewToggleBtn {
display: flex;
align-items: center;
gap: 0.25rem;
padding: 0.375rem 0.625rem;
font-size: 0.8125rem;
font-weight: 500;
background: transparent;
border: none;
border-radius: 5px;
cursor: pointer;
color: var(--text-secondary, #5c564d);
transition: all 0.2s ease;
}
.viewToggleBtn:hover {
color: var(--text-primary, #1a1612);
}
.viewToggleBtn.active {
background: var(--bg-card, white);
color: var(--accent-coral, #e07256);
box-shadow: 0 2px 4px rgba(26, 22, 18, 0.08);
}
.viewToggleBtn svg {
flex-shrink: 0;
}
.results {
margin-top: 1rem;
}
.mapViewResults {
margin-top: 0;
}
/* Map View Layout */
.mapViewContainer {
display: grid;
grid-template-columns: 1fr 340px;
gap: 1rem;
height: 480px;
}
.mapContainer {
border-radius: 10px;
overflow: hidden;
border: 1px solid var(--border-color, #e5dfd5);
height: 100%;
}
.compactList {
display: flex;
flex-direction: column;
gap: 0.5rem;
overflow-y: auto;
height: 100%;
padding-right: 0.375rem;
}
.compactList::-webkit-scrollbar {
width: 6px;
}
.compactList::-webkit-scrollbar-track {
background: var(--bg-secondary, #f3ede4);
border-radius: 3px;
}
.compactList::-webkit-scrollbar-thumb {
background: var(--border-color, #e5dfd5);
border-radius: 3px;
}
.compactList::-webkit-scrollbar-thumb:hover {
background: var(--text-muted, #8a847a);
}
/* Compact School Item */
.compactItem {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.75rem;
padding: 0.625rem 0.75rem;
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 8px;
transition: all 0.2s ease;
}
.compactItem:hover {
border-color: var(--accent-coral, #e07256);
box-shadow: 0 2px 6px rgba(26, 22, 18, 0.05);
}
.compactItemContent {
flex: 1;
min-width: 0;
}
.compactItemHeader {
display: flex;
align-items: center;
gap: 0.375rem;
margin-bottom: 0.125rem;
}
.compactItemName {
font-weight: 600;
font-size: 0.8125rem;
color: var(--text-primary, #1a1612);
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.compactItemName:hover {
color: var(--accent-coral, #e07256);
}
.distanceBadge {
flex-shrink: 0;
padding: 0.0625rem 0.375rem;
font-size: 0.6875rem;
font-weight: 600;
background: var(--accent-teal, #2d7d7d);
color: white;
border-radius: 3px;
}
.compactItemMeta {
display: flex;
gap: 0.375rem;
font-size: 0.6875rem;
color: var(--text-secondary, #5c564d);
margin-bottom: 0.25rem;
}
.compactItemMeta span:not(:last-child)::after {
content: '·';
margin-left: 0.375rem;
color: var(--text-muted, #8a847a);
}
.compactItemStats {
display: flex;
gap: 0.75rem;
font-size: 0.6875rem;
color: var(--text-secondary, #5c564d);
}
.compactStat strong {
color: var(--text-primary, #1a1612);
}
.compactItemActions {
display: flex;
flex-direction: column;
gap: 0.25rem;
flex-shrink: 0;
}
.compactBtn {
padding: 0.25rem 0.5rem;
font-size: 0.6875rem;
font-weight: 600;
background: var(--accent-coral, #e07256);
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
text-align: center;
}
.compactBtn:hover {
background: var(--accent-coral-dark, #c45a3f);
}
.compactBtn.compactBtnActive {
background: var(--bg-secondary, #f3ede4);
color: var(--text-secondary, #5c564d);
border: 1px solid var(--border-color, #e5dfd5);
}
.compactBtn.compactBtnActive:hover {
background: var(--border-color, #e5dfd5);
color: var(--text-primary, #1a1612);
}
.compactBtnSecondary {
padding: 0.25rem 0.5rem;
font-size: 0.6875rem;
font-weight: 500;
background: transparent;
color: var(--text-secondary, #5c564d);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
text-align: center;
}
.compactBtnSecondary:hover {
background: var(--bg-secondary, #f3ede4);
color: var(--text-primary, #1a1612);
}
.sectionHeader {
margin-bottom: 1rem;
}
.sectionHeader h2 {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 0.5rem;
color: var(--text-primary, #1a1612);
font-family: var(--font-playfair), 'Playfair Display', serif;
}
/* Decorative coral bar under section headings */
.sectionHeader h2::after {
content: '';
display: block;
width: 50px;
height: 2px;
background: var(--accent-coral, #e07256);
border-radius: 1px;
margin-top: 0.5rem;
}
.sectionDescription {
font-size: 0.9375rem;
color: var(--text-secondary, #5c564d);
margin: 0;
line-height: 1.5;
}
.resultsHeader {
margin-bottom: 1rem;
padding-bottom: 0.625rem;
border-bottom: 2px solid var(--border-color, #e5dfd5);
}
.resultsHeader h2 {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary, #1a1612);
margin: 0;
display: flex;
align-items: center;
gap: 0.375rem;
}
.resultsHeader h2::before {
content: '';
display: inline-block;
width: 3px;
height: 1.125em;
background: var(--accent-coral, #e07256);
border-radius: 2px;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
margin-bottom: 1.25rem;
}
/* Staggered grid entry animation */
.grid > * {
animation: gridItemFadeIn 0.4s ease-out both;
}
.grid > *:nth-child(1) { animation-delay: 0ms; }
.grid > *:nth-child(2) { animation-delay: 50ms; }
.grid > *:nth-child(3) { animation-delay: 100ms; }
.grid > *:nth-child(4) { animation-delay: 150ms; }
.grid > *:nth-child(5) { animation-delay: 200ms; }
.grid > *:nth-child(6) { animation-delay: 250ms; }
.grid > *:nth-child(7) { animation-delay: 300ms; }
.grid > *:nth-child(8) { animation-delay: 350ms; }
.grid > *:nth-child(9) { animation-delay: 400ms; }
.grid > *:nth-child(n+10) { animation-delay: 450ms; }
@keyframes gridItemFadeIn {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.emptyState {
text-align: center;
padding: 2.5rem 1.5rem;
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
}
.emptyStateTitle {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary, #1a1612);
margin-bottom: 0.375rem;
font-family: var(--font-playfair), 'Playfair Display', serif;
}
.emptyStateDescription {
font-size: 0.9375rem;
color: var(--text-secondary, #5c564d);
max-width: 380px;
margin: 0 auto;
}
@media (max-width: 768px) {
.grid {
grid-template-columns: 1fr;
gap: 0.75rem;
}
.locationBannerWrapper {
flex-direction: column;
align-items: stretch;
margin-bottom: 0.75rem;
}
.locationBanner {
padding: 0.5rem 0.75rem;
font-size: 0.8125rem;
border-radius: 6px;
}
.viewToggle {
justify-content: center;
}
.mapViewContainer {
grid-template-columns: 1fr;
grid-template-rows: 260px auto;
height: auto;
gap: 0.75rem;
}
.mapContainer {
height: 260px;
}
.compactList {
height: auto;
max-height: 350px;
padding-right: 0;
}
.compactItem {
flex-direction: column;
align-items: stretch;
gap: 0.5rem;
}
.compactItemActions {
flex-direction: row;
}
.compactItemActions > * {
flex: 1;
}
.emptyState {
padding: 2rem 1.25rem;
}
}
/* Highlighted List Item */
.highlightedItem .compactItem {
border-color: var(--accent-teal, #2d7d7d);
box-shadow: 0 0 0 1px var(--accent-teal, #2d7d7d);
background: var(--bg-secondary, #f3ede4);
}
/* Mobile Bottom Sheet */
.bottomSheetWrapper {
display: none;
}
@media (max-width: 768px) {
.bottomSheetWrapper {
display: block;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 1000;
padding: 1rem;
pointer-events: none;
}
.bottomSheet {
position: relative;
background: var(--bg-card, white);
border-radius: 12px;
box-shadow: 0 -4px 24px rgba(26, 22, 18, 0.15);
pointer-events: auto;
animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.bottomSheet .compactItem {
border: none;
box-shadow: none;
background: transparent;
padding: 1rem;
}
.bottomSheet .compactItem:hover {
box-shadow: none;
}
.closeSheetBtn {
position: absolute;
top: -12px;
right: -12px;
width: 30px;
height: 30px;
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
color: var(--text-secondary, #5c564d);
cursor: pointer;
box-shadow: 0 2px 8px rgba(26, 22, 18, 0.1);
z-index: 10;
}
@keyframes slideUpSheet {
from {
transform: translateY(120%);
}
to {
transform: translateY(0);
}
}
/* When map view on mobile, expand map and hide list */
.mapViewContainer {
grid-template-columns: 1fr;
grid-template-rows: 1fr;
height: calc(100vh - 280px);
min-height: 400px;
}
.mapContainer {
height: 100%;
}
.compactList {
display: none;
}
}