|
1 | 1 | {% if paginator.total_pages > 1 %}
|
2 | 2 | <div class="pagination">
|
3 | 3 | <div class="previous">
|
4 |
| - {% if paginator.previous_page %} |
| 4 | + |
| 5 | + {% if paginator.previous_page and paginator.previous_page != 1%} |
5 | 6 | <!-- << -->
|
6 |
| - {% if paginator.previous_page != 1 %} |
7 | 7 | <a alt="{{ site.theme_settings.str_previous_page }}" href="{{ '/' | relative_url }}" style="margin-right:0.1em" class="button">
|
8 | 8 | <i class="fa fa-angle-double-left"></i>
|
9 | 9 | </a>
|
10 | 10 | {% endif %}
|
| 11 | + |
11 | 12 | <!-- < previous -->
|
12 |
| - <a href="{{ paginator.previous_page_path | relative_url }}" class="button"> |
| 13 | + <a href="{{ paginator.previous_page_path | relative_url }}" {% unless paginator.previous_page %}style="visibility:hidden"{% endunless %} class="button"> |
13 | 14 | <i class="fa fa-chevron-left"></i>
|
14 | 15 | {{ site.theme_settings.str_previous_page }}
|
15 | 16 | </a>
|
16 |
| - {% endif %} |
17 |
| - |
18 |
| - {% unless paginator.previous_page %} |
19 |
| - |
20 |
| - <a href="{{ paginator.previous_page_path | relative_url }}" style="visibility:hidden" class="button"> |
21 |
| - <i class="fa fa-chevron-left"></i> |
22 |
| - {{ site.theme_settings.str_previous_page }} |
23 |
| - </a> |
24 |
| - {% endunless %} |
25 | 17 | </div>
|
26 | 18 |
|
27 | 19 | <div class="page_number">
|
28 |
| - |
29 | 20 | {{ paginator.page }} / {{ paginator.total_pages }}
|
30 |
| - |
31 | 21 | </div>
|
32 | 22 |
|
33 | 23 | <div class="next">
|
34 |
| - {% if paginator.next_page %} |
| 24 | + |
35 | 25 | <!-- next > -->
|
36 |
| - <a alt="{{ site.theme_settings.str_next_page }}" href="{{ paginator.next_page_path | relative_url }}" class="button"> |
| 26 | + <a alt="{{ site.theme_settings.str_next_page }}" href="{{ paginator.next_page_path | relative_url }}" {% unless paginator.next_page %}style="visibility:hidden"{% endunless %} class="button"> |
37 | 27 | {{ site.theme_settings.str_next_page }}
|
38 | 28 | <i class="fa fa-chevron-right"></i>
|
39 | 29 | </a>
|
| 30 | + |
| 31 | + {% if paginator.next_page and paginator.next_page != paginator.total_pages %} |
40 | 32 | <!-- >> -->
|
41 |
| - {% if paginator.next_page != paginator.total_pages %} |
42 | 33 | <a href="{{ site.paginate_path | relative_url | replace: ':num', paginator.total_pages }}" style="margin-left:0.1em" class="button">
|
43 | 34 | <i class="fa fa-angle-double-right"></i>
|
44 | 35 | </a>
|
45 | 36 | {% endif %}
|
46 |
| - {% endif %} |
47 |
| - |
48 |
| - {% unless paginator.next_page %} |
49 |
| - |
50 |
| - <a alt="{{ site.theme_settings.str_next_page }}" href="{{ paginator.next_page_path | relative_url }}" style="visibility:hidden" class="button"> |
51 |
| - {{ site.theme_settings.str_next_page }} |
52 |
| - <i class="fa fa-chevron-right"></i> |
53 |
| - </a> |
54 |
| - {% endunless %} |
| 37 | + |
55 | 38 | </div>
|
56 | 39 | </div>
|
57 | 40 | {% endif %}
|
0 commit comments