Skip to content

Commit

Permalink
Merge pull request #60 from daymun/fix-pagination
Browse files Browse the repository at this point in the history
fix pagination
  • Loading branch information
emberian committed Nov 3, 2014
2 parents f34baa0 + cdad87e commit 5b728d5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
{% endfor %}
<nav id="pagenavi">
{% if paginator.previous_page %}
<a href="{{paginator.previous_page}}" class="prev">Prev</a>
{% if paginator.previous_page == 1 %}
<a href="{{ root_url }}/" class="prev">Prev</a>
{% else %}
<a href="{{ root_url }}/posts/{{paginator.previous_page}}" class="prev">Prev</a>
{% endif %}
{% endif %}
{% if paginator.next_page %}
<a href="{{paginator.next_page}}" class="next">Next</a>
<a href="{{ root_url }}/posts/{{paginator.next_page}}" class="next">Next</a>
{% endif %}
<div class="center"><a href="{{ root_url }}/blog/archives">Blog Archives</a></div>
</nav>
</nav>

0 comments on commit 5b728d5

Please # to comment.