Sha256: 2d0d2fde3d8ee0aa5e51f7a54428636b27e7755c2d9dc68d2df07020464e4986
Contents?: true
Size: 1.36 KB
Versions: 19
Compression:
Stored size: 1.36 KB
Contents
<% add_gem_component_stylesheet("step-by-step-nav-header") title ||= false path ||= false disable_ga4 ||= false breadcrumbs = [ { title: "Home", url: "/" }, { title: title, url: path } ] breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs) data = {} data[:module] = "ga4-link-tracker" unless disable_ga4 unless disable_ga4 ga4_data = { event_name: "navigation", type: "super breadcrumb", index_link: "1", index_total: "1", }.to_json end shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) classes = %w[gem-c-step-nav-header] classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom] %> <% if title %> <script type="application/ld+json"> <%= raw JSON.pretty_generate(breadcrumb_presenter.structured_data) %> </script> <%= tag.div(class: classes, data: data) do %> <strong class="gem-c-step-nav-header__part-of">Part of</strong> <% if path %> <a href="<%= path %>" class="gem-c-step-nav-header__title govuk-link gem-print-link" <% unless disable_ga4 %> data-ga4-link='<%= ga4_data %>' <% end %> > <%= title %> </a> <% else %> <span class="gem-c-step-nav-header__title"> <%= title %> </span> <% end %> <% end %> <% end %>
Version data entries
19 entries across 19 versions & 1 rubygems