forked from github/pelican
feat: this is going live now
This commit is contained in:
parent
eeaffe79e1
commit
06cac4589c
410 changed files with 4684 additions and 44715 deletions
46
templates/pagination.html
Normal file
46
templates/pagination.html
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{% 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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue