You are here

views-mini-pager.html.twig in Open Social 8

Theme override for a views mini-pager.

Available variables:

  • items: List of pager items.

File

themes/socialbase/templates/views/views-mini-pager.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a views mini-pager.
  5. *
  6. * Available variables:
  7. * - items: List of pager items.
  8. *
  9. * @ingroup templates
  10. *
  11. * @see template_preprocess_views_mini_pager()
  12. */
  13. #}
  14. {{ attach_library('socialbase/pagination') }}
  15. {% if items.previous or items.next %}
  16. <nav role="navigation" aria-labelledby="pagination-heading">
  17. <h4 class="sr-only">{{ 'Pagination'|t }}</h4>
  18. <ul class="mini-pager">
  19. {% if items.previous %}
  20. <li class="pager__item pager__item--previous">
  21. <a class="btn btn-flat" href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}>
  22. <span aria-hidden="true">
  23. <svg class="icon-small">
  24. <use xlink:href="#icon-navigate_before"> </use>
  25. </svg>
  26. </span>
  27. <span>{{ 'Newer items'|t }} </span>
  28. </a>
  29. </li>
  30. {% endif %}
  31. {% if items.next %}
  32. <li class="pager__item pager__item--next">
  33. <a class="btn btn-flat" href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
  34. <span>{{ 'Older items'|t }} </span>
  35. <span aria-hidden="true">
  36. <svg class="icon-small">
  37. <use xlink:href="#icon-navigate_next"> </use>
  38. </svg>
  39. </span>
  40. </a>
  41. </li>
  42. {% endif %}
  43. </ul>
  44. </nav>
  45. {% endif %}