]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/layouts/_flash.html.erb
Add srcset to img tags inside picture elements
[rails.git] / app / views / layouts / _flash.html.erb
index 2ba8ee95dae1bda9cadfd6ffb9592460a5bccab8..dc458fdcf2d9b194948b43f367e76c9c59f25671 100644 (file)
@@ -2,7 +2,7 @@
   <div class="flash error">
     <picture>
       <source srcset="<%= image_path "notice.svg" %>" type="image/svg+xml">
-      <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+      <%= image_tag("notice.png", :srcset => image_path("notice.svg"), :class => "small_icon", :border => 0) %>
     </picture>
     <div class="message"><%= flash[:error] %></div>
   </div>
@@ -12,7 +12,7 @@
   <div class="flash warning">
     <picture>
       <source srcset="<%= image_path "notice.svg" %>" type="image/svg+xml">
-      <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+      <%= image_tag("notice.png", :srcset => image_path("notice.svg"), :class => "small_icon", :border => 0) %>
     </picture>
     <div class="message"><%= flash[:warning] %></div>
   </div>
@@ -22,7 +22,7 @@
   <div class="flash notice">
     <picture>
       <source srcset="<%= image_path "notice.svg" %>" type="image/svg+xml">
-      <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+      <%= image_tag("notice.png", :srcset => image_path("notice.svg"), :class => "small_icon", :border => 0) %>
     </picture>
     <div class="message"><%= flash[:notice] %></div>
   </div>