Sha256: 37265c01f8219638729497725da6e584262e4c25d5192f75f5eb56f49a047f8b
Contents?: true
Size: 1.1 KB
Versions: 51
Compression:
Stored size: 1.1 KB
Contents
<% breadcrumbs ||= [] inverse ||= false collapse_on_mobile ||= false breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs) classes = "gem-c-breadcrumbs govuk-breadcrumbs" classes << " govuk-breadcrumbs--collapse-on-mobile" if collapse_on_mobile classes << " gem-c-breadcrumbs--inverse" if inverse %> <script type="application/ld+json"> <%= raw JSON.pretty_generate(breadcrumb_presenter.structured_data) %> </script> <div class="<%= classes %>" 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"> <% if breadcrumb.is_link? %> <%= link_to( breadcrumb[:title], breadcrumb.path, data: breadcrumb.tracking_data(breadcrumbs.length), class: "govuk-breadcrumbs__link", ) %> <% else %> <%= breadcrumb[:title] %> <% end %> </li> <% end %> </ol> </div>
Version data entries
51 entries across 51 versions & 1 rubygems