-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
39 lines (32 loc) · 1.01 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
---
layout: base
---
{% for post in paginator.posts %}
<div class="post">
<h2 class="post-title">
<a href="{{ post.url | prepend: site.baseurl }}">
{% if post.title %}
{{ post.title }}
{% else %}
{{ site.page_no_title }}
{% endif %}
</a>
</h2>
<div class="post-meta"><i class="icon-post-date"> {{ post.date | date: "%Y年%m月%d日" }}</i></div>
<div class="post-content">{{ post.content | strip_html | truncate:300 }}</div>
<p class="readmore"><a href="{{ post.url | prepend: site.baseurl }}">阅读更多</a></p>
</div>
{% endfor %}
<div class="page-navigator">
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a href="/" class="previous">上一页</a>
{% else %}
<a href="/page/{{ paginator.previous_page }}/" class="previous">上一页</a>
{% endif %}
{% endif %}
<span class="page-number">第 {{ paginator.page }}/{{ paginator.total_pages }} 页</span>
{% if paginator.next_page %}
<a href="/page/{{ paginator.next_page }}/" class="next">下一页</a>
{% endif %}
</div>