diff options
Diffstat (limited to '_includes/paginate.html')
-rw-r--r-- | _includes/paginate.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/_includes/paginate.html b/_includes/paginate.html new file mode 100644 index 0000000..df2d75a --- /dev/null +++ b/_includes/paginate.html @@ -0,0 +1,37 @@ +{% comment %} +For the pagination styles see http://getbootstrap.com/components/#pagination +{% endcomment %} +<nav> + <ul class="pagination"> + <li> + {% if paginator.previous_page %} + <a href="{{ paginator.previous_page_path }}" aria-label="Previous"> + <span aria-hidden="true">«</span> + </a> + {% else %} + <span aria-hidden="true">«</span> + {% endif %} + </li> + {% comment %} + The first page is a special flower, see + http://jekyllrb.com/docs/pagination/ + {% endcomment %} + <li{% if paginator.page == 1 %} class="active"{% endif %}> + <a href="/">1</a> + </li> + {% for i in (2..paginator.total_pages) %} + <li{% if paginator.page == i %} class="active"{% endif %}> + <a href="/{{ site.paginate_path | replace: ':num', i }}">{{ i }}</a> + </li> + {% endfor %} + <li> + {% if paginator.next_page %} + <a href="{{ paginator.next_page_path }}" aria-label="Next"> + <span aria-hidden="true">»</span> + </a> + {% else %} + <span aria-hidden="true">»</span> + {% endif %} + </li> + </ul> +</nav> |