forked from github/pelican
46 lines
2.2 KiB
HTML
46 lines
2.2 KiB
HTML
{% if DEFAULT_PAGINATION %} {% set first_page = articles_paginator.page(1) %} {%
|
|
set last_page = articles_paginator.page(articles_paginator.num_pages) %}
|
|
<nav class="flex justify-center items-center">
|
|
{% if articles_page.has_previous() %}
|
|
<ul class="list-none inline-grid grid-cols-[max-content_max-content_max-content_max-content_max-content] border-t-2 border-rp-dawn-overlay dark:border-rp-moon-overlay m-4 p-4">
|
|
<span class="p-1">
|
|
<li class="text-center bg-rp-dawn-overlay dark:bg-rp-moon-overlay w-12">
|
|
<a
|
|
class="block no-underline hover:no-underline"
|
|
title="Go to the previous page"
|
|
href="{{ SITEURL }}/{{ articles_previous_page.url }}"
|
|
><tt>«</tt></a>
|
|
</li>
|
|
</span>
|
|
{% else %}
|
|
<!--If we are on the first page, there's no previous links, so reduce grid sizing-->
|
|
<ul class="list-none inline-grid grid-cols-[max-content_max-content_max-content] border-t-2 border-rp-dawn-overlay dark:border-rp-moon-overlay m-4 p-4">
|
|
{% endif %}
|
|
<span class="p-1">
|
|
<li class="text-center">
|
|
Page {{ articles_page.number }} of {{ articles_paginator.num_pages }}
|
|
</li>
|
|
</span>
|
|
{% if articles_page.has_next() %}
|
|
<span class="p-1">
|
|
<li class="text-center bg-rp-dawn-overlay dark:bg-rp-moon-overlay w-8">
|
|
<a
|
|
class="block no-underline hover:no-underline"
|
|
href="{{ SITEURL }}/{{ articles_next_page.url }}"
|
|
title="Go to page {{ articles_page.next_page_number() }}"
|
|
>{{ articles_page.next_page_number() }}</a>
|
|
</li>
|
|
</span>
|
|
<span class="p-1">
|
|
<li class="text-center bg-rp-dawn-overlay dark:bg-rp-moon-overlay w-12">
|
|
<a
|
|
class="block no-underline hover:no-underline align-top"
|
|
href="{{ SITEURL }}/{{ articles_next_page.url }}"
|
|
title="Go to the next page"
|
|
><tt>»</tt></a>
|
|
</li>
|
|
</span>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|