You are here

calendar-pager.html.twig in Calendar 8.2

Same filename and directory in other branches
  1. 8 templates/calendar-pager.html.twig

Default theme implementation for a calendar pager.

Available variables:

  • items: List of pager items.

File

templates/calendar-pager.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a calendar pager.
  5. *
  6. * Available variables:
  7. * - items: List of pager items.
  8. *
  9. * @ingroup themeable
  10. */
  11. #}
  12. <h3 class="calendar-pager">{{ items.title }}</h3>
  13. {% if (items.previous or items.next) and not exclude %}
  14. <nav class="pager" role="navigation" aria-labelledby="pagination-heading">
  15. <h4 class="visually-hidden">{{ 'Pagination'|t }}</h4>
  16. <ul class="js-pager__items">
  17. {% if items.previous %}
  18. <li class="pager__item pager__item--previous">
  19. <a href="{{ items.previous.url }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}>
  20. <span aria-hidden="true">{{ items.previous.text|default('‹‹'|t) }}</span>
  21. <span>{{ 'Previous'|t }}</span>
  22. </a>
  23. </li>
  24. {% endif %}
  25. {% if items.current %}
  26. <li class="pager__item pager__item--current">{{ items.current }}</li>
  27. {% endif %}
  28. {% if items.next %}
  29. <li class="pager__item pager__item--next">
  30. <a href="{{ items.next.url }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
  31. <span>{{ 'Next'|t }}</span>
  32. <span aria-hidden="true">{{ items.next.text|default('››'|t) }}</span>
  33. </a>
  34. </li>
  35. {% endif %}
  36. </ul>
  37. </nav>
  38. {% endif %}