pyro/templates/pagination.html
Irrlicht 6aa68cbe21 [style][template] Remove category list, improve pagination
- Remove category list from the menu items and add a link to the
  categories page. The pages are listed in the order given by the
  configuration variable MENU_PAGES. Each element must be the title of
  the page for which a link must be added. Add category to displayed article metadata.
- Pagination nav is now flex to have a better and predictive layout and
  sizing. Element are no longer list elements.
- Adapte css sheet to change in the layout and make necessary change to
  unify the style between different site using the theme.
2025-10-07 07:32:46 +02:00

35 lines
1.8 KiB
HTML

{% if DEFAULT_PAGINATION %}
{% set first_page = articles_paginator.page(1) %}
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
{% if articles_paginator.num_pages > 1 %}
<nav class="pagination" aria-role="pagination">
{% set previous_previous_page = articles_page.number - 2 %}
{% set previous_page = articles_page.number - 1 %}
{% if articles_page.has_previous() %}
<a class="pagination" title="début" href="{{ SITEURL }}/{{ first_page.url }}"><</a></li>
{% else %}
<span class="pagination-dummy"><</span>
{% endif %}
{% if previous_previous_page > 0 %}
<a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(previous_previous_page).url }}">{{ previous_previous_page }}</a>
{% endif %}
{% if previous_page > 0 %}
<a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(previous_page).url }}">{{ previous_page }}</a>
{% endif %}
<a class="pagination" aria-current="page" href="{{ SITEURL }}/{{ articles_paginator.page(articles_page.number).url }}">{{ articles_page.number }}</a>
{% set next_next_page = articles_page.number + 2 %}
{% set next_page = articles_page.number + 1 %}
{% if next_page <= articles_paginator.num_pages %}
<a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(next_page).url }}">{{ next_page }}</a>
{% endif %}
{% if next_next_page <= articles_paginator.num_pages %}
<a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(next_next_page).url }}">{{ next_next_page }}</a>
{% endif %}
{% if articles_page.has_next() %}
<a class="pagination" title="fin" href="{{ SITEURL }}/{{ last_page.url }}">></a>
{% else %}
<span class="pagination-dummy">></span>
{% endif %}
</nav>
{% endif %}
{% endif %}