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;
} }
.map-control { .leaflet-container {
background: var(--map-control-bg-color); .map {
padding: 5px 10px; filter: var(--map-filter);
border: 2px solid var(--map-control-border-color); }
border-radius: 3px; .map-control {
color: var(--map-control-color); background: var(--map-control-bg-color);
padding: 5px 10px;
border: 2px solid var(--map-control-border-color);
border-radius: 3px;
color: var(--map-control-color);
&:hover {
background-color: var(--dropdown-hover-color);
}
}
} }
::v-deep(.fullscreen) { ::v-deep(.fullscreen) {
display: flex; display: flex;

View File

@ -4,7 +4,7 @@
@import 'vars'; @import 'vars';
html [data-theme='dark'] { html [data-theme='dark'] {
color-scheme: dark; color-scheme: dark;
} }
body { body {
@ -114,7 +114,7 @@ button {
} }
&:hover { &:hover {
background: var( --button-transparent-hover-color); background: var(--button-transparent-hover-color);
color: var(--button-hover-color); color: var(--button-hover-color);
} }
@ -134,7 +134,7 @@ button {
background: var(--button-cancel-bg-color); background: var(--button-cancel-bg-color);
color: var(--button-cancel-color); color: var(--button-cancel-color);
&:hover { &:hover {
background: var( --button-transparent-hover-color); background: var(--button-transparent-hover-color);
color: var(--button-hover-color); color: var(--button-hover-color);
} }
} }
@ -143,7 +143,7 @@ button {
background: var(--button-confirm-bg-color); background: var(--button-confirm-bg-color);
color: var(--button-confirm-color); color: var(--button-confirm-color);
&:hover { &:hover {
background: var( --button-transparent-hover-color); background: var(--button-transparent-hover-color);
color: var(--button-hover-color); color: var(--button-hover-color);
} }
} }

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;