forked from pytorch/pytorch.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpagination_buttons.html
30 lines (29 loc) · 1.03 KB
/
pagination_buttons.html
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
29
30
<div class="d-flex justify-content-center">
<ul class="pagination">
{% if paginator.previous_page %}
<li class="page-item">
{% if page.title contains 'Blog' %}
<a class="page-link" href="{{ site.baseurl }}{{ paginator.previous_page_path }}">Previous</a>
{% else %}
<a class="page-link" href="{{ site.baseurl }}/{{ paginator.previous_page_path }}">Previous</a>
{% endif %}
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link">Previous</a>
</li>
{% endif %}
{% if paginator.next_page %}
{% if page.title contains 'Blog' %}
<li class="page-item"><a class="page-link" href="{{ site.baseurl }}{{ paginator.next_page_path }}">Next</a>
{% else %}
<li class="page-item"><a class="page-link" href="{{ site.baseurl }}/{{ paginator.next_page_path }}">Next</a>
{% endif %}
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link">Next</a>
</li>
{% endif %}
</ul>
</div>