-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (52 loc) · 2.38 KB
/
index.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
layout: default
---
<!-- 分页列表 -->
<ul class="list-group list-group-flush ms-0 shadow-sm my-3">
{% for post in paginator.posts %}
<li class="list-group-item list-group-item-action" title="{{ post.title }}">
<small class="text-info-emphasis">{{ post.date | date:"%Y-%m-%d %H:%M:%S" }}</small>
<div class="d-flex w-100 justify-content-between text-truncate">
<a href="{{ post.url | prepend: site.baseurl }}" class="stretched-link">{{ post.title }}</a>
</div>
</li>
{% endfor %}
</ul>
<!-- 分页链接 -->
<nav aria-label="Page navigation">
<ul class="pagination justify-content-end">
<li class="page-item {% if paginator.page == 1 %}disabled{% endif %}">
<a class="page-link" href="/">首页</a>
</li>
<li class="page-item {% if paginator.page == 1 %}disabled{% endif %}">
{% if paginator.page > 1 %}
<a class="page-link" href="{{paginator.previous_page_path}}" aria-label="Previous">
<span aria-hidden="true" title="上一页">«</span>
</a>
{% else %}
<span class="page-link" aria-hidden="true" title="上一页">«</span>
{% endif %}
</li>
<li class="page-item {% if paginator.page == 1 %}disabled{% endif %}">
<a class="page-link" href="/">1</a>
</li>
{% for count in (2..paginator.total_pages) %}
<li class="page-item {% if count == paginator.page %}active{% endif %}">
<a class="page-link" href="/page/{{ count }}">{{ count }}</a>
</li>
{% endfor %}
<li class="page-item {% if paginator.page == paginator.total_pages %}disabled{% endif %}">
{% if paginator.page < paginator.total_pages %}
<a class="page-link" href="{{paginator.next_page_path}}" aria-label="Next">
<span aria-hidden="true" title="下一页">»</span>
</a>
{% else %}
<span class="page-link" aria-hidden="true" title="下一页">»</span>
{% endif %}
</li>
<li class="page-item {% if paginator.page == paginator.total_pages %}disabled{% endif %}">
<a class="page-link" href="/page/{{paginator.total_pages}}">末页</a>
</li>
<li class="page-item"><span class="page-link">共{{paginator.total_pages}}页</span></li>
</ul>
</nav>