]> git.openstreetmap.org Git - rails.git/commitdiff
Make the logo on the error page clickable
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Aug 2019 14:02:34 +0000 (16:02 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Aug 2019 14:02:34 +0000 (16:02 +0200)
Also use the same picture/srcset code as on the main header

app/views/layouts/error.html.erb

index f429feb5963b083201f242508ed97b3663a17b56..9b5f4f34b9536718974ceecadb42a36372f55f42 100644 (file)
@@ -6,7 +6,12 @@
     <%= stylesheet_link_tag "errors", :media => "screen" %>
   </head>
   <body>
-    <%= image_tag "osm_logo.png", :class => "logo" %>
+    <a href="<%= root_path %>">
+      <picture>
+        <source srcset="<%= image_path "osm_logo.svg" %>" type="image/svg+xml"></source>
+        <%= image_tag "osm_logo.png", :srcset => image_path("osm_logo.svg"), :alt => t("layouts.logo.alt_text"), :class => "logo" %>
+      </picture>
+    </a>
     <div class="details">
       <%= yield %>
     </div>