forked from elixir-lang/elixir-lang.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpagination.html
More file actions
28 lines (24 loc) · 893 Bytes
/
Copy pathpagination.html
File metadata and controls
28 lines (24 loc) · 893 Bytes
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
<div id="post-pagination" class="pagination loop-pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="prev page-numbers" href="/blog">Previous</a>
{% else %}
<a class="prev page-numbers" href="/blog/page{{paginator.previous_page}}">Previous</a>
{% endif %}
{% endif %}
{% if paginator.page == 1 %}
<span class="page-numbers current">1</span>
{% else %}
<a class="page-numbers" href="/blog">1</a>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<span class="page-numbers current">{{count}}</span>
{% else %}
<a class="page-numbers" href="/blog/page{{count}}">{{count}}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a class="next page-numbers spec" href="/blog/page{{paginator.next_page}}">Next</a>
{% endif %}
</div>