Skip to content

Commit

Permalink
Updated pagination of built-texts template
Browse files Browse the repository at this point in the history
  • Loading branch information
dimo414 committed Jul 28, 2015
1 parent 00c6ec8 commit 1137200
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions built-texts/templates/pagination.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{% if DEFAULT_PAGINATION %}
<div class="pagination">
<ul>
{% if articles_page.has_previous() %}
{% set num = articles_page.previous_page_number() %}
<li class="prev"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">&larr; Previous</a></li>
<li class="prev"><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&larr; Previous</a></li>
{% else %}
<li class="prev disabled"><a href="#">&larr; Previous</a></li>
{% endif %}

{% for num in range( 1, 1 + articles_paginator.num_pages ) %}
<li class="{{ 'active' if num == articles_page.number else '' }}"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{ num }}</a></li>
<li class="{{ 'active' if num == articles_page.number else '' }}"><a href="{{ SITEURL }}/{{ articles_paginator.page(num).url }}">{{ num }}</a></li>
{% endfor %}

{% if articles_page.has_next() %}
<li class="next"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Next &rarr;</a></li>
<li class="next"><a href="{{ SITEURL }}/{{ articles_next_page.url }}">Next &rarr;</a></li>
{% else %}
<li class="next disabled"><a href="#">&rarr; Next</a></li>
{% endif %}

</ul>
</div>
{% endif %}

0 comments on commit 1137200

Please sign in to comment.