blob: 69eac104e99aa7d43cc29c1f2d0d15b4cfd08797 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
{# Use PAGINATION_PATTERNS or pagination may break #}
{% if DEFAULT_PAGINATION and (articles_page.has_previous() or articles_page.has_next()) %}
<div class="clear"></div>
<div class="pages">
{% if PAGINATION_PATTERNS[0][0] != 0 %}
{%- if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %}
<a href="{{ SITEURL }}/" class="prev_page">← Previous</a>
{%- else %}
<a href="{{ SITEURL }}/page/{{ articles_page.previous_page_number() }}" class="prev_page">← Previous</a>
{%- endif %}
{%- endif %}
{%- if articles_page.has_next() %}
<a href="{{ SITEURL }}/page/{{ articles_page.next_page_number() }}" class="next_page">Next →</a>
{%- endif %}
{% else %}
{%- if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %}
<a href="{{ SITEURL }}/{{ page_name }}.html" class="prev_page">← Previous</a>
{%- else %}
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html" class="prev_page">← Previous</a>
{%- endif %}
{%- endif %}
{%- if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html" class="next_page">Next →</a>
{%- endif %}
{% endif %}
<span>Page {{ articles_page.number }} of {{ articles_paginator.num_pages }}</span>
</div>
{% endif %}
|