Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
271 changes: 230 additions & 41 deletions css/catchment.css
Original file line number Diff line number Diff line change
@@ -1,62 +1,251 @@
/* This is used to specify the map area. */
html, body, .row, .container, .container-map, #map {
/**
* School Catchment Map - Custom Styles
* Bootstrap 5 compatible
*/

/* ============================================================================
Layout & Container Styles
============================================================================ */

html, body {
height: 100%;
padding-bottom: 16px;
margin: 0;
padding: 0;
}

.container-map {
position: absolute;
top: 70px;
bottom: 45px;
left: 0;
right: 0;
}

#map {
height: 100%;
width: 100%;
}

/* ============================================================================
Navigation & Offcanvas
============================================================================ */


/* Offcanvas body scrolling */
.offcanvas-body {
overflow-y: auto;
}

/* ============================================================================
Address Search / Geocoder
============================================================================ */

.address-search {
position: absolute;
top: 10px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
width: 90%;
max-width: 400px;
}

.address-search .input-group {
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Add padding on the top and bottom so the top and bottom of map align with nav bars */
body {
padding: 54px 0;
}
/* Fix transparent SVG icons in search buttons */
.address-search .btn-outline-secondary {
color: #6c757d;
background-color: white;
border-color: #ced4da;
}

.address-search .btn-outline-secondary:hover {
color: #495057;
background-color: #e9ecef;
border-color: #6c757d;
}

.address-search .btn-outline-secondary svg {
fill: currentColor;
}

/* Autocomplete dropdown */
.autocomplete-items {
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 1001;
background-color: white;
border: 1px solid #ced4da;
border-top: none;
border-radius: 0 0 0.25rem 0.25rem;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
max-height: 200px;
overflow-y: auto;
display: none;
}

.autocomplete-item {
padding: 10px;
cursor: pointer;
background-color: white;
border-bottom: 1px solid #e9ecef;
font-size: 0.9rem;
}

/* To remove border and shading in footer */
.panel-footer {
line-height: 1.8;
background-color: #f8f8f8;
border-top: 0px;
}
.autocomplete-item:hover,
.autocomplete-item.autocomplete-active {
background-color: #e9ecef;
}

.autocomplete-item:last-child {
border-bottom: none;
}

/* ============================================================================
Filter Menu Styles
============================================================================ */

.offcanvas-body .form-check {
margin-bottom: 0.5rem;
}

.offcanvas-body .form-check-label {
cursor: pointer;
user-select: none;
}

/* This sets the mobile size of the off cavas menus */
.navmenu {
padding: 0 10px;
width: 250px;
.offcanvas-body .badge {
display: inline-block;
width: 100%;
text-align: left;
padding: 0.5rem;
font-size: 0.875rem;
font-weight: 600;
}

/* To accommodate header with filter and see Leaflet Control */
@media (max-width: 365px) {
.navbar-brand {
font-size: 12px;
padding-left: 10px;
/* Section headers within filter groups */
.offcanvas-body strong.small {
display: block;
margin-bottom: 0.25rem;
color: #495057;
}

/* ============================================================================
Responsive Adjustments
============================================================================ */

/* Small screens */
@media (max-width: 576px) {
.address-search {
width: 95%;
max-width: none;
}

.navbar-brand span {
font-size: 0.9rem;
}

.panel-footer {
font-size: 11px;
.offcanvas-body .form-check-label {
font-size: 0.85rem;
}
}

/* To accommodate iPad portrait mode */
@media (min-width: 0px) {
.navbar-toggle {
display: block; /* force showing the toggle */
/* Medium screens and up */
@media (min-width: 768px) {
.address-search {
width: 400px;
}

/* Wider offcanvas on larger screens */
.offcanvas-end {
width: 400px;
}
}

/* This is for the "normal" size off canvas menu */
@media (min-width: 992px) {
body {
padding: 50px 250px 50px 0;
/* ============================================================================
Footer Styles
============================================================================ */

.navbar-fixed-bottom {
border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* ============================================================================
Leaflet Override Styles
============================================================================ */

/* Ensure Leaflet controls don't overlap with search bar */
.leaflet-top.leaflet-left {
margin-top: 60px;
}

/* Ensure Leaflet attribution has proper spacing */
.leaflet-bottom.leaflet-left {
margin-bottom: 50px;
margin-left: 10px;
}

/* Better popup styling */
.leaflet-popup-content {
margin: 13px 19px;
line-height: 1.4;
}

.leaflet-popup-content b {
font-weight: 600;
}

/* Marker cluster styling adjustments */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
background-color: rgba(51, 136, 255, 0.6);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
background-color: rgba(51, 136, 255, 0.8);
color: white;
font-weight: bold;
}

/* ============================================================================
Utility Classes
============================================================================ */

/* Smooth transitions */
.form-check-input {
cursor: pointer;
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* Loading state (can be used later for better UX) */
.loading {
opacity: 0.6;
pointer-events: none;
}

/* ============================================================================
Print Styles
============================================================================ */

@media print {
.navbar,
.offcanvas,
.address-search {
display: none;
}

.navmenu {
padding: 50px 10px;
body {
padding: 0;
}

.navmenu-toggle {
display: none !important;
#map {
height: 100vh;
}
}

/* Geocoder */
.ui-autocomplete {
z-index: 1000;
}
Loading