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/paginator.liquid
2023-08-06 16:55:54 -07:00

33 lines
No EOL
1.2 KiB
Text

<nav class="flex justify-between mt-8 items-center">
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">
<button class="py-2 pr-4 dark:text-purple-400 text-purple-600 hover:text-purple-500 dark:hover:text-purple-500" aria-label="Previous page icon--20">
{% tablericon "arrow-left" "Previous" %}
</button>
</a>
{% else %}
<button
class="py-2 pr-4 cursor-not-allowed disabled:opacity-50 icon--20"
aria-label="Previous page (disabled)"
disabled>
{% tablericon "arrow-left" "Prevous" %}
</button>
{% endif %}
<div class="text-center">
{{ pagination.pageNumber | plus: 1 }} of {{ pagination.links.size }}
</div>
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}">
<button class="py-2 pl-4 dark:text-purple-400 text-purple-600 hover:text-purple-500 dark:hover:text-purple-500 icon--20" aria-label="Next page">
{% tablericon "arrow-right" "Next" %}
</button>
</a>
{% else %}
<button
class="py-2 pl-4 cursor-not-allowed disabled:opacity-50 icon--20"
aria-label="Next page (disabled)"
disabled>
{% tablericon "arrow-right" "Next" %}
</button>
{% endif %}
</nav>