Sha256: 79a4dd324e27de9795ef67dcb43662990167d5af3828b2ead549c04935d4b7f0
Contents?: true
Size: 1.42 KB
Versions: 48
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.titleize, 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
48 entries across 48 versions & 1 rubygems