{% if pages.pageCount > 1 %}
<nav class="pagination" aria-label="ページネーション">
{# Previous button #}
{% if pages.previous is defined %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}" class="pagination__arrow pagination__arrow--prev" aria-label="前のページ">
<svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
</svg>
</a>
{% else %}
<button class="pagination__arrow pagination__arrow--prev" type="button" aria-label="前のページ" disabled>
<svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
</svg>
</button>
{% endif %}
{# Page numbers #}
<div class="pagination__numbers">
{% for page in pages.pagesInRange %}
{% if page == pages.current %}
<span class="pagination__number pagination__number--active">{{ page }}</span>
{% else %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="pagination__number">{{ page }}</a>
{% endif %}
{% endfor %}
</div>
{# Next button #}
{% if pages.next is defined %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}" class="pagination__arrow pagination__arrow--next" aria-label="次のページ">
<svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
</svg>
</a>
{% else %}
<button class="pagination__arrow pagination__arrow--next" type="button" aria-label="次のページ" disabled>
<svg width="12" height="12" viewbox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
</svg>
</button>
{% endif %}
</nav>
{% endif %}