Sha256: 3e13168218d8aecd03fe74f58bfea525b619115e66ef580d70777d672fe682a6

Contents?: true

Size: 695 Bytes

Versions: 3

Compression:

Stored size: 695 Bytes

Contents

<% translations ||= [] %>
<% if translations.length > 1 %>
  <nav role="navigation" class="gem-c-translation-nav" aria-label="<%= t("common.translations") %>">
    <ul class="gem-c-translation-nav__list">
      <% translations.each.with_index do |translation, i| %>
        <li class="gem-c-translation-nav__list-item">
          <% if translation[:active] %>
            <span lang="<%= translation[:locale] %>"><%= translation[:text] %></span>
          <% else %>
            <%= link_to translation[:text], translation[:base_path], hreflang: translation[:locale], lang: translation[:locale], rel: "alternate" %>
          <% end %>
        </li>
      <% end %>
    </ul>
  </nav>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
govuk_publishing_components-7.3.0 app/views/govuk_publishing_components/components/_translation-nav.html.erb
govuk_publishing_components-7.2.0 app/views/govuk_publishing_components/components/_translation-nav.html.erb
govuk_publishing_components-7.1.0 app/views/govuk_publishing_components/components/_translation-nav.html.erb