}
@include color-mode(dark) {
- .leaflet-tile-container .leaflet-tile,
- .mapkey-table-entry td:first-child > * {
- filter: brightness(.8);
- }
-
.leaflet-container .leaflet-control-attribution a {
color: var(--bs-link-color);
}
}
}
+@mixin dark-map-color-scheme {
+ .leaflet-tile-container .leaflet-tile,
+ .mapkey-table-entry td:first-child > * {
+ filter: brightness(.8);
+ }
+}
+
+body[data-map-theme="dark"] {
+ @include dark-map-color-scheme;
+}
+
+@include color-mode(dark) {
+ body:not([data-map-theme]) {
+ @include dark-map-color-scheme;
+ }
+}
+
/* Rules for attribution text under the main map shown on printouts */
.donate-attr { color: darken($green, 10%) !important; }
:dir => dir,
:data => { :bs_theme => (preferred_color_scheme(:site) if preferred_color_scheme(:site) != "auto") } do %>
<%= render :partial => "layouts/head" %>
- <body class="<%= body_class %>">
+ <%= tag.body :class => body_class,
+ :data => { :map_theme => (preferred_color_scheme(:map) if preferred_color_scheme(:map) != "auto") } do %>
<%= render :partial => "layouts/header" %>
<%= render :partial => "layouts/content" %>
<% if defined?(Settings.matomo) -%>
<noscript><p><img src="<%= request.protocol %><%= Settings.matomo["location"] %>/matomo.php?idsite=<%= Settings.matomo["site"] %>" class="matomo" alt="" /></p></noscript>
<% end -%>
- </body>
+ <% end %>
<% end %>