
- Pagination is now a list of button with a maxium of 5 pages and "begin" and "end" buttons - Current page is now signaled with a different background. Applied to links in the banner and page link of the pagination
35 lines
2 KiB
HTML
35 lines
2 KiB
HTML
<div class="pagination-wrapper content-subhead">
|
|
{% 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">
|
|
<ul>
|
|
{% set previous_previous_page = articles_page.number - 2 %}
|
|
{% set previous_page = articles_page.number - 1 %}
|
|
{% if articles_page.has_previous() %}
|
|
<li><a class="pagination" href="{{ SITEURL }}/{{ first_page.url }}"><span>Début</a></li>
|
|
{% endif %}
|
|
{% if previous_previous_page > 0 %}
|
|
<li><a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(previous_previous_page).url }}"><span>{{ previous_previous_page }}</a></li>
|
|
{% endif %}
|
|
{% if previous_page > 0 %}
|
|
<li><a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(previous_page).url }}"><span>{{ previous_page }}</a></li>
|
|
{% endif %}
|
|
<li><a class="pagination" aria-current="page" href="{{ SITEURL }}/{{ articles_paginator.page(articles_page.number).url }}"><span>{{ articles_page.number }}</a></li>
|
|
{% set next_next_page = articles_page.number + 2 %}
|
|
{% set next_page = articles_page.number + 1 %}
|
|
{% if next_page <= articles_paginator.num_pages %}
|
|
<li><a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(next_page).url }}"><span>{{ next_page }}</a></li>
|
|
{% endif %}
|
|
{% if next_next_page <= articles_paginator.num_pages %}
|
|
<li><a class="pagination" href="{{ SITEURL }}/{{ articles_paginator.page(next_next_page).url }}"><span>{{ next_next_page }}</a></li>
|
|
{% endif %}
|
|
{% if articles_page.has_next() %}
|
|
<li><a class="pagination" href="{{ SITEURL }}/{{ last_page.url }}">Fin</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|