_includes/pagination.html in appscms-tools-theme-0.1.9 vs _includes/pagination.html in appscms-tools-theme-0.2.0

- old
+ new

@@ -1,16 +1,35 @@ -<div class="post-links"> - <div class="bottompagination"> - <div class="pointerup"><i class="fa fa-caret-up"></i></div> - <span class="navigation" role="navigation"> - <div class="pagination"> - {% if page.previous.url %} - <a class="ml-1 mr-1 pageUrl" href="{{page.previous.url}}">« Prev</a> - {% endif %} - {% if page.next.url %} - <a class="ml-1 mr-1 pageUrl" href="{{page.next.url}}"> Next »</a> +<!-- pagination --> +<div class="bottompagination"> + <div class="pointerup"><i class="fa fa-caret-up"></i></div> + <span class="navigation" role="navigation"></span> +</div> +{% if paginator.total_pages > 1 %} +<div class="blog-pagination"> + {% if paginator.previous_page %} + <a style="color: #00ab6b; font-weight: 900;" + href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a> + {% else %} + <span class="text-muted">&laquo; Prev</span> + {% endif %} - {% endif %} - </div> - </span> - </div> -</div> + {% for page in (1..paginator.total_pages) %} + {% if page == paginator.page %} + <span class="webjeda text-muted">{{ page }}</span> + {% elsif page == 1 %} + <a href="/blog" style="color: #00ab6b; font-weight: 900;">{{ page }}</a> + {% else %} + <a style="color: #00ab6b; font-weight: 900;" + href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page + }}</a> + {% endif %} + {% endfor %} + + {% if paginator.next_page %} + <a style="color:#00ab6b; font-weight: 900;" + href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next + &raquo;</a> + {% else %} + <span class="text-muted">Next &raquo;</span> + {% endif %} +</div> +{% endif %} \ No newline at end of file