claro-8.x-1.x-dev/templates/views/views-mini-pager.html.twig
templates/views/views-mini-pager.html.twig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | {# /** * @file * Theme override for a views mini-pager. * * Available variables: * - heading_id: The unique id for the pager label, added by Claro. * - items: List of pager items. * * @see template_preprocess_views_mini_pager() * @see claro_preprocess_views_mini_pager() */ #} {% set pager_action_classes = [ 'pager__link' , 'pager__link--mini' , 'pager__link--action-link' ] %} {% if items.previous or items.next %} <nav{{ attributes.addClass( 'pager' ).setAttribute( 'role' , 'navigation' ).setAttribute( 'aria-labelledby' , heading_id) }}> <h4{{ title_attributes.addClass( 'visually-hidden' ).setAttribute( 'id' , heading_id) }}>{{ 'Pagination' |t }}</h4> <ul{{ content_attributes.addClass( 'pager__items' , 'js-pager__items' ) }}> {% if items.previous %} {% spaceless %} <li class = "pager__item pager__item--mini pager__item--action pager__item--previous" > <a{{ items.previous.attributes.addClass(pager_action_classes).setAttribute( 'title' , 'Go to previous page' |t).setAttribute( 'href' , items.previous.href) }}> <span class = "visually-hidden" >{{ 'Previous page' |t }}</span> </a> </li> {% endspaceless %} {% endif %} {% if items.current %} <li class = "pager__item pager__item--mini pager__item--current" > <span class = "visually-hidden" > {{ 'Current page' |t }} </span> {{ items.current }} </li> {% endif %} {% if items.next %} {% spaceless %} <li class = "pager__item pager__item--mini pager__item--action pager__item--next" > <a{{ items.next.attributes.addClass(pager_action_classes).setAttribute( 'title' , 'Go to next page' |t).setAttribute( 'href' , items.next.href) }}> <span class = "visually-hidden" >{{ 'Next page' |t }}</span> </a> </li> {% endspaceless %} {% endif %} </ul> </nav> {% endif %} |