This repository has been archived on 2025-03-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coryd.dev-eleventy/src/_includes/partials/paginator.liquid

33 lines
No EOL
1.3 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">
{% tablericon "arrow-left" "Previous" "width=20 height=20" %}
</button>
</a>
{% else %}
<button
class="py-2 pr-4 cursor-not-allowed disabled:opacity-50"
aria-label="Previous page (disabled)"
disabled>
{% tablericon "arrow-left" "Prevous" "width=20 height=20" %}
</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" aria-label="Next page">
{% tablericon "arrow-right" "Next" "width=20 height=20" %}
</button>
</a>
{% else %}
<button
class="py-2 pl-4 cursor-not-allowed disabled:opacity-50"
aria-label="Next page (disabled)"
disabled>
{% tablericon "arrow-right" "Next" "width=20 height=20" %}
</button>
{% endif %}
</nav>