<% if @admin_banner&.active? %> <% unless session[:hide_banner] || current_user&.preference&.banner_seen %>
<%= raw sanitize_field(@admin_banner, :content, image_safety_mode: true) %>
<% if current_user.nil? %>

<%= link_to current_path_with(hide_banner: true), "aria-label": t(".hide"), class: "showme action" do content_tag(:span, "×".html_safe, "aria-hidden": true) end %>

<% else %> <%= form_tag end_banner_user_path(current_user), method: :post, remote: true do %>

<%= button_tag "aria-label": t(".hide"), class: "showme action" do content_tag(:span, "×".html_safe, "aria-hidden": true) end %>

<% end %> <% end %>
<% end %> <% end %>