]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4681'
authorTom Hughes <tom@compton.nu>
Thu, 11 Apr 2024 17:37:20 +0000 (18:37 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 11 Apr 2024 17:37:20 +0000 (18:37 +0100)
app/assets/stylesheets/common.scss
app/views/traces/_trace.html.erb
app/views/traces/edit.html.erb
app/views/traces/show.html.erb

index 3e80e66f5dde14f0dbbedf6e7614a4d3e0884ed2..1ccdc7871454547b94623c1f393e469a1c222e1f 100644 (file)
@@ -1031,4 +1031,17 @@ div.secondary-actions {
   margin-bottom: -1px;
 }
 
+/* Rules for traces */
+
+img.trace_image {
+  mix-blend-mode: darken;
+}
+
+@include color-mode(dark) {
+  img.trace_image {
+    filter: invert(1);
+    mix-blend-mode: lighten;
+  }
+}
+
 @import 'browse';
index 184570499dbca6228b01c1b6f031949d11f1de64..72794355bc447185d4d9243c714d6f8a49112e13 100644 (file)
@@ -2,7 +2,7 @@
   <td>
     <% if Settings.status != "gpx_offline" %>
       <% if trace.inserted %>
-        <%= link_to image_tag(trace_icon_path(trace.user, trace), :alt => ""), show_trace_path(trace.user, trace) %>
+        <%= link_to image_tag(trace_icon_path(trace.user, trace), :alt => "", :class => "trace_image"), show_trace_path(trace.user, trace) %>
       <% else %>
         <span class="text-danger"><%= t ".pending" %></span>
       <% end %>
index 809112d4b177bcf4397820f108cf2d6d1c26f02b..2059178cfa91303ca496f68839d590f6db097141 100644 (file)
@@ -2,7 +2,7 @@
   <h1><%= t ".heading", :name => @trace.name %></h1>
 <% end %>
 
-<%= image_tag trace_picture_path(@trace.user, @trace) %>
+<%= image_tag trace_picture_path(@trace.user, @trace), :class => "trace_image" %>
 
 <%= bootstrap_form_for @trace do |f| %>
   <%= f.text_field :name, :disabled => true %>
index def928da57bc56d604bbc759f92ee1c64ce42284..51b21f9828e0f72cfdd56488f0e6657e9098a442 100644 (file)
@@ -4,7 +4,7 @@
 
 <% if Settings.status != "gpx_offline" %>
   <% if @trace.inserted %>
-    <%= image_tag trace_picture_path(@trace.user, @trace) %>
+    <%= image_tag trace_picture_path(@trace.user, @trace), :class => "trace_image" %>
   <% else %>
     <span class="text-danger"><%= t ".pending" %></span>
   <% end %>