Client - display workout map with dark mode colors when enabled

This commit is contained in:
Sam 2023-12-17 09:33:30 +01:00
parent 2ad22bec6a
commit b9f0deffe1
5 changed files with 35 additions and 10 deletions

View File

@ -143,6 +143,9 @@
.mountains { .mountains {
padding-right: $default-padding * 0.5; padding-right: $default-padding * 0.5;
} }
.mountains {
filter: var(--mountains-filter);
}
.workout-data { .workout-data {
padding: $default-padding * 0.5 0; padding: $default-padding * 0.5 0;

View File

@ -17,6 +17,7 @@
ref="workoutMap" ref="workoutMap"
@ready="fitBounds(bounds)" @ready="fitBounds(bounds)"
:use-global-leaflet="false" :use-global-leaflet="false"
class="map"
> >
<LControlLayers /> <LControlLayers />
<LControl <LControl
@ -213,12 +214,21 @@
.no-map { .no-map {
line-height: 400px; line-height: 400px;
} }
.leaflet-container {
.map {
filter: var(--map-filter);
}
.map-control { .map-control {
background: var(--map-control-bg-color); background: var(--map-control-bg-color);
padding: 5px 10px; padding: 5px 10px;
border: 2px solid var(--map-control-border-color); border: 2px solid var(--map-control-border-color);
border-radius: 3px; border-radius: 3px;
color: var(--map-control-color); color: var(--map-control-color);
&:hover {
background-color: var(--dropdown-hover-color);
}
}
} }
::v-deep(.fullscreen) { ::v-deep(.fullscreen) {
display: flex; display: flex;

View File

@ -85,6 +85,12 @@
--map-control-bg-color: #ffffff; --map-control-bg-color: #ffffff;
--map-control-border-color: #bfc0ab; --map-control-border-color: #bfc0ab;
--map-attribution-text: rgba(255, 255, 255, 0.7); --map-attribution-text: rgba(255, 255, 255, 0.7);
--map-filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(0.8);
--map-layers-overlays: var(--app-color);
--map-control-bar: var(--app-color);
--mountains-filter: invert(90%) sepia(19%) saturate(0%) hue-rotate(39deg)
brightness(86%) contrast(102%);
--cell-heading-bg-color: #eeeeee; --cell-heading-bg-color: #eeeeee;
--cell-heading-color: #696969; --cell-heading-color: #696969;

View File

@ -82,6 +82,12 @@
--map-control-bg-color: #ffffff; --map-control-bg-color: #ffffff;
--map-control-border-color: #bfc0ab; --map-control-border-color: #bfc0ab;
--map-attribution-text: rgba(255, 255, 255, 0.7); --map-attribution-text: rgba(255, 255, 255, 0.7);
--map-filter: initial;
--map-layers-overlays: initial;
--map-control-bar: #bfc0ab;
--mountains-filter: invert(19%) sepia(9%) saturate(2921%) hue-rotate(169deg)
brightness(85%) contrast(80%);
--cell-heading-bg-color: #eeeeee; --cell-heading-bg-color: #eeeeee;
--cell-heading-color: #696969; --cell-heading-color: #696969;