Skip to content
Open
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
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
<html lang="en">

<head>

<link rel="stylesheet" href="/public/styles.css" />
<link href='https://fonts.googleapis.com/css?family=Kumbh Sans' rel='stylesheet'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
Expand All @@ -18,6 +19,7 @@
<script src="https://cdn.jsdelivr.net/npm/@turf/[email protected]/turf.min.js"></script>
<script type="module" src="../src/main.js" defer></script>
<script src="/src/components/Search/osmtogeojson.js"></script>
<script type="module" src="../src/services/Darkmode.js" defer></script>
<script src="/src/components/DistanceFinder/Polyline.encoded.js" defer></script>
<script src="https://unpkg.com/[email protected]/dist/Leaflet.VectorGrid.bundled.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
Expand Down Expand Up @@ -70,6 +72,7 @@
</div>
<button class="fa fa-location-arrow" id="locateme" title="Locate me"
aria-label="Locate your location on map"></button>
<button title="Click To Enable Dark Mode" aria-label="Click to enable Drak Mode" class="fas fa-moon" title="Dark Mode " id="darkModeToggle"></button>
</div>

<div id="infoBox" tabindex="-1">
Expand Down
58 changes: 58 additions & 0 deletions public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -461,4 +461,62 @@ footer {
align-items: right;
float: right;
margin-left: 10px;
}



/* Dark Mode - Text and Base Elements */
body.dark-mode {
background-color: #121212;
color: #ffffff !important; /* Force white text everywhere */
}

/* Force white text on all child elements */
body.dark-mode * {
color: #ffffff !important;
}

/* Map Container */
body.dark-mode #map {
background-color: #1a1a1a;
}

/* Map Tiles - Dark Mode Version */
body.dark-mode .leaflet-tile {
filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

/* Map Controls */
body.dark-mode .leaflet-control {
background-color: #2d2d2d !important;
color: white !important;
border-color: #444 !important;
}

/* Map Popups */
body.dark-mode .leaflet-popup-content-wrapper {
background-color: #2d2d2d !important;
color: white !important;
}

/* Buttons and Inputs - Keep some contrast */
body.dark-mode button:not(#darkModeToggle),
body.dark-mode input {
background-color: #333 !important;
color: white !important;
border-color: #555 !important;
}

/* Dark Mode Toggle Button */
body.dark-mode #darkModeToggle {
color: #ffcc00 !important; /* Yellow color for visibility */
}

/* Specific element overrides */
body.dark-mode #infoBox,
body.dark-mode .box,
body.dark-mode #searchdetails {
background-color: #1e1e1e !important;
color: white !important;
border-color: #444 !important;
}
Loading