]> git.openstreetmap.org Git - rails.git/commitdiff
Allow a srcset to be specified for banners
authorTom Hughes <tom@compton.nu>
Sun, 13 Aug 2023 08:37:27 +0000 (09:37 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 13 Aug 2023 08:37:27 +0000 (09:37 +0100)
app/views/layouts/_banner.html.erb

index f806201eb8ff929eedc11585370ff904c42c3ecf..c7cc75c492ff26d7b50d00b81994ae70293bb7c9 100644 (file)
@@ -1,4 +1,4 @@
 <% unless (banner = next_banner()).nil? %>
-<%= link_to (image_tag banner[:img], :alt => banner[:alt], :title => banner[:alt]), banner[:link] %>
+<%= link_to (image_tag banner[:img], :srcset => banner[:srcset], :alt => banner[:alt], :title => banner[:alt]), banner[:link] %>
 <button type="button" class="btn-close position-absolute top-0 end-0 p-4" id="<%= banner_cookie(banner[:id]) %>" aria-label="<%= t("javascripts.close") %>"></button>
 <% end %>