{#
/**
 * @file
 * Theme override for a views mini-pager.
 *
 * Available variables:
 * - heading_id: Pagination heading ID.
 * - items: List of pager items.
 *
 * @see template_preprocess_views_mini_pager()
 */
#}
{% if items.previous or items.next %}
  <nav class="pager" role="navigation" aria-labelledby="{{ heading_id }}">
    <h4 id="{{ heading_id }}" class="pager__heading visually-hidden">{{ 'Pagination'|t }}</h4>
    <ul class="pagination pager__items js-pager__items">
	   {# Print first item if we are not on the first page. #}
      {% if items.first %}
        <li class="page-item pager__item--first">
          <a href="{{ items.first.href }}" title="{{ 'Go to first page'|t }}" {{ items.first.attributes.addCLass('page-link')|without('href', 'title') }}>
            <span class="visually-hidden">{{ 'First page'|t }}</span>
            <span aria-hidden="true">{{ items.first.text|default('« First'|t) }}</span>
          </a>
        </li>
      {% endif %}
      {% if items.previous %}
        <li class="page-item pager__item pager__item--previous">
          <a href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev" {{ items.previous.attributes.addCLass('page-link')|without('href', 'title', 'rel') }}>>
            <span class="visually-hidden">{{ 'Previous page'|t }}</span>
            <span aria-hidden="true">{{ items.previous.text|default('‹‹'|t) }}</span>
          </a>
        </li>
      {% endif %}
      {% if items.current %}
        <li class="page-item{{ current == key ? ' is-active active' : '' }}" {{ current == key ? ' aria-current="page"' : '' }}>
          {{ pager_max ? '@key / @count'|t({'@key': items.current , '@count': pager_max}) : key }}
        </li>
      {% endif %}
      {% if items.next %}
        <li class="page-item pager__item pager__item--next">
          <a href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next" {{ items.next.attributes.addCLass('page-link')|without('href', 'title', 'rel') }}>
            <span class="visually-hidden">{{ 'Next page'|t }}</span>
            <span aria-hidden="true">{{ items.next.text|default('››'|t) }}</span>
          </a>
        </li>
      {% endif %}
      {# Print last item if we are not on the last page. #}
      {% if items.last %}
        <li class="page-item pager__item--last">
          <a href="{{ items.last.href }}" title="{{ 'Go to last page'|t }}" {{ items.last.attributes.addCLass('page-link')|without('href', 'title') }}>
            <span class="visually-hidden">{{ 'Last page'|t }}</span>
            <span aria-hidden="true">{{ items.last.text|default('Last »'|t) }}</span>
          </a>
        </li>
      {% endif %}
    </ul>
  </nav>
{% endif %}
