Sha256: 5cc374b19b7cbcc8b155878e2291ad68b6f3518244574d67a78565c26d352888
Contents?: true
Size: 1.42 KB
Versions: 42
Compression:
Stored size: 1.42 KB
Contents
<% add_gem_component_stylesheet("phase-banner") app_name ||= nil phase ||= nil message ||= nil inverse ||= false disable_ga4 ||= false unless message.present? if phase == "beta" message = raw("This part of GOV.UK is being rebuilt – <a class=\"govuk-link\" href=\"/help/beta\">find out what beta means</a>") elsif phase == "alpha" message = raw("This part of GOV.UK is being built – <a class=\"govuk-link\" href=\"/service-manual/agile-delivery/how-the-alpha-phase-works\">find out what alpha means</a>") end end container_css_classes = %w(gem-c-phase-banner govuk-phase-banner) container_css_classes << "gem-c-phase-banner--inverse" if inverse data_attributes = {} unless disable_ga4 data_attributes[:ga4_phase_banner] = phase data_attributes[:module] = "ga4-link-tracker" data_attributes[:ga4_track_links_only] = "" data_attributes[:ga4_set_indexes] = "" data_attributes[:ga4_link] = { event_name: "navigation", type: "phase banner", section: Nokogiri::HTML(message).text, }.to_json end %> <%= tag.div class: container_css_classes, data: data_attributes do %> <%= tag.p class: "govuk-phase-banner__content" do %> <%= tag.strong app_name, class: "govuk-phase-banner__content__app-name" if app_name %> <%= tag.strong phase, class: "govuk-tag govuk-phase-banner__content__tag" if phase %> <%= tag.span message, class: "govuk-phase-banner__text" if message %> <% end %> <% end %>
Version data entries
42 entries across 42 versions & 1 rubygems