Sha256: d4c22ec87cb5a89da5a4a857a76075d9c101aba3275cc562a999a282459f02ba
Contents?: true
Size: 1.28 KB
Versions: 164
Compression:
Stored size: 1.28 KB
Contents
<% breadcrumbs ||= [] collapse_on_mobile ||= false inverse ||= false collapse_class = collapse_on_mobile && breadcrumbs.any? { |crumb| crumb[:is_page_parent] } ? "gem-c-breadcrumbs--collapse-on-mobile" : "" invert_class = inverse ? "gem-c-breadcrumbs--inverse" : "" breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs, request.path) %> <script type="application/ld+json"> <%= raw breadcrumb_presenter.structured_data.to_json %> </script> <div class="gem-c-breadcrumbs govuk-breadcrumbs <%= invert_class %>" data-module="track-click"> <ol class="govuk-breadcrumbs__list"> <% breadcrumbs.each_with_index do |crumb, index| %> <% breadcrumb = GovukPublishingComponents::Presenters::Breadcrumb.new(crumb, index) %> <li class="govuk-breadcrumbs__list-item" aria-current="<%= breadcrumb.aria_current %>"> <% if breadcrumb.is_link? %> <%= link_to( breadcrumb[:title], breadcrumb.path, data: breadcrumb.tracking_data(breadcrumbs.length), class: "govuk-breadcrumbs__link", aria: { current: breadcrumb.aria_current, } ) %> <% else %> <%= breadcrumb[:title] %> <% end %> </li> <% end %> </ol> </div>
Version data entries
164 entries across 164 versions & 1 rubygems