app/template/default/Block/pagination.twig line 1

Open in your IDE?
  1. {% if pages.pageCount > 1 %}
  2.     <nav class="pagination" aria-label="ページネーション">
  3.         {# Previous button #}
  4.         {% if pages.previous is defined %}
  5.             <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}" class="pagination__arrow pagination__arrow--prev" aria-label="前のページ">
  6.                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  7.                     <path d="M7.88804 0.993792L4.83334 4.04849C3.70863 5.1732 3.70863 6.99672 4.83334 8.12143L7.88804 11.1761" stroke="#353535" stroke-width="1.35"/>
  8.                 </svg>
  9.             </a>
  10.         {% else %}
  11.             <button class="pagination__arrow pagination__arrow--prev" type="button" aria-label="前のページ" disabled>
  12.                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  13.                     <path d="M7.88804 0.993792L4.83334 4.04849C3.70863 5.1732 3.70863 6.99672 4.83334 8.12143L7.88804 11.1761" stroke="#353535" stroke-width="1.35"/>
  14.                 </svg>
  15.             </button>
  16.         {% endif %}
  17.         {# Page numbers #}
  18.         <div class="pagination__numbers">
  19.             {% for page in pages.pagesInRange %}
  20.                 {% if page == pages.current %}
  21.                     <span class="pagination__number pagination__number--active">{{ page }}</span>
  22.                 {% else %}
  23.                     <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="pagination__number">{{ page }}</a>
  24.                 {% endif %}
  25.             {% endfor %}
  26.         </div>
  27.         {# Next button #}
  28.         {% if pages.next is defined %}
  29.             <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}" class="pagination__arrow pagination__arrow--next" aria-label="次のページ">
  30.                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  31.                     <path d="M4.11196 0.993792L7.16666 4.04849C8.29137 5.1732 8.29137 6.99672 7.16666 8.12143L4.11196 11.1761" stroke="#353535" stroke-width="1.35"/>
  32.                 </svg>
  33.             </a>
  34.         {% else %}
  35.             <button class="pagination__arrow pagination__arrow--next" type="button" aria-label="次のページ" disabled>
  36.                 <svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
  37.                     <path d="M4.11196 0.993792L7.16666 4.04849C8.29137 5.1732 8.29137 6.99672 7.16666 8.12143L4.11196 11.1761" stroke="#353535" stroke-width="1.35"/>
  38.                 </svg>
  39.             </button>
  40.         {% endif %}
  41.     </nav>
  42. {% endif %}