This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/includes/partials/nav/paginator.liquid

33 lines
No EOL
1.1 KiB
Text

<script type="module" src="/assets/scripts/components/select-pagination.js?v={% appVersion %}"></script>
<nav aria-label="Pagination" class="pagination">
{%- if pagination.href.previous -%}
<a href="{{ pagination.href.previous }}" aria-label="Previous page">
{% tablericon "arrow-left" %}
</a>
{%- else -%}
<span class="disabled" disabled>
{% tablericon "arrow-left" %}
</span>
{%- endif -%}
<select-pagination>
<select class="client-side" aria-label="Page selection">
{%- for pageEntry in pagination.pages -%}
<option value="{{ forloop.index | minus: 1 }}">{{ forloop.index }} of {{ pagination.links.size }}</option>
{%- endfor -%}
</select>
<noscript>
<p>
<span aria-current="page">{{ pagination.pageNumber | plus: 1 }}</span> of {{ pagination.links.size }}
</p>
</noscript>
</select-pagination>
{%- if pagination.href.next -%}
<a href="{{ pagination.href.next }}" aria-label="Next page">
{% tablericon "arrow-right" %}
</a>
{%- else -%}
<span class="disabled" disabled>
{% tablericon "arrow-right" %}
</span>
{%- endif -%}
</nav>