]> git.openstreetmap.org Git - rails.git/commitdiff
Add support for dark banner images that need a white close icon
authorTom Hughes <tom@compton.nu>
Sun, 13 Aug 2023 20:57:09 +0000 (21:57 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 13 Aug 2023 20:57:09 +0000 (21:57 +0100)
app/views/layouts/_banner.html.erb
config/banners.yml

index c7cc75c492ff26d7b50d00b81994ae70293bb7c9..298135f45c7ad295f59f42a5d5437ef04d7c5780 100644 (file)
@@ -1,4 +1,4 @@
 <% unless (banner = next_banner()).nil? %>
 <%= 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>
+<button type="button" class="btn-close <%= "btn-close-white" if banner[:dark] %> position-absolute top-0 end-0 p-4" id="<%= banner_cookie(banner[:id]) %>" aria-label="<%= t("javascripts.close") %>"></button>
 <% end %>
index 36f1c41278d605ff72e1bea1d857d63a947b32e2..c2a4df07b2ae4440186053193d6acb59c20a6cef 100644 (file)
@@ -6,4 +6,5 @@ donate_2023:
   srcset:
     - [banners/donate_2023_1.jpg, 1x]
     - [banners/donate_2023_1@2x.jpg, 2x]
+  dark: true
   enddate: 2023-dec-31