-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (43 loc) · 1.23 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
---
layout: default
---
{% for post in paginator.posts %}
<article class="post">
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
<div class="entry">
{{ post.excerpt }}
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endfor %}
<!-- 分页链接 -->
<div id="post-pagination" class="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a href="/">Previous</a>
{% else %}
<a href="{{ paginator.previous_page_path }}">Previous</a>
{% endif %}
{% else %}
<span>Previous</span>
{% endif %}
<ul class="pages">
{% if paginator.page == 1 %}
<span class="current-page">1</span>
{% else %}
<a href="/">1</a>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<span class="current-page">{{ count }}</span>
{% else %}
<a href="/page{{ count }}">{{ count }}</a>
{% endif %}
{% endfor %}
</ul>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}">Next</a>
{% else %}
<span>Next</span>
{% endif %}
</div>