]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/layouts/_flash.html.erb
Use picture elements to render some more graphics as SVG
[rails.git] / app / views / layouts / _flash.html.erb
index da559d55c924488dfaee1a789a001d5073110ba8..2ba8ee95dae1bda9cadfd6ffb9592460a5bccab8 100644 (file)
@@ -1,11 +1,29 @@
 <% if flash[:error] %>
-  <div id="error"><%= flash[:error] %></div>
+  <div class="flash error">
+    <picture>
+      <source srcset="<%= image_path "notice.svg" %>" type="image/svg+xml">
+      <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+    </picture>
+    <div class="message"><%= flash[:error] %></div>
+  </div>
 <% end %>
 
 <% if flash[:warning] %>
-  <div id="warning"><%= flash[:warning] %></div>
+  <div class="flash warning">
+    <picture>
+      <source srcset="<%= image_path "notice.svg" %>" type="image/svg+xml">
+      <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+    </picture>
+    <div class="message"><%= flash[:warning] %></div>
+  </div>
 <% end %>
 
 <% if flash[:notice] %>
-  <div id="notice"><%= flash[:notice] %></div>
+  <div class="flash notice">
+    <picture>
+      <source srcset="<%= image_path "notice.svg" %>" type="image/svg+xml">
+      <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+    </picture>
+    <div class="message"><%= flash[:notice] %></div>
+  </div>
 <% end %>