Add support for dark banner images that need a white close icon

This commit is contained in:
Tom Hughes 2023-08-13 21:57:09 +01:00
parent 242b73b632
commit 7912b7620f
2 changed files with 2 additions and 1 deletions

View 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 %>