-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
80 lines (73 loc) · 2.21 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
layout: default
---
<div class="home">
<div class="site-header-container {% if site.cover %}has-cover{% endif %}">
<div class="scrim {% if site.cover %}has-cover{% endif %}">
<header class="site-header">
<h1 class="title">{{ site.title }}</h1>
{% if site.subtitle %}<p class="subtitle">{{ site.subtitle }}</p>{% endif %}
</header>
</div>
</div>
<div class="wrapper">
<ul class="post-list">
{% for post in paginator.posts %}
<li>
<h2>
<a class="post-link" target="_blank" href="/{{ post.url | remove_first: '/' | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
<section class="post-excerpt" itemprop="description">
<p>{{ post.content | strip_html | truncatewords: 50 }}</p>
</section>
<section class="post-meta">
<div class="post-date">{{ post.date | date: "%Y年%m月%d日" }}</div>
<div class="post-categories">
{% if post.categories %} in {% for cat in post.categories %}
<a href="/{{ site.baseurl }}category/?cate={{ cat }}">{{ cat | capitalize }}</a>
{% endfor %}{% endif %}
</div>
</section>
</li>
{% if forloop.last == false %}
<hr>
{% endif %}
{% endfor %}
</ul>
<nav class="pagination" role="navigation">
<p>
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a class="newer-posts" href="/{{ site.baseurl }}">
<span class="icon-page">
<i class="icon-font i-v-left"></i>
</span>
</a>
{% else %}
<a class="newer-posts" href="/{{ site.baseurl }}page{{paginator.previous_page}}">
<span class="icon-page">
<i class="icon-font i-v-left"></i>
</span>
</a>
{% endif %}
{% else %}
<span class="icon-page">
<i class="icon-font i-v-left"></i>
</span>
{% endif %}
<span class="page-number">第{{ paginator.page }}页 共{{ paginator.total_pages }}页</span>
{% if paginator.next_page %}
<a class="newer-posts" href="/{{ site.baseurl }}page{{paginator.next_page}}">
<span class="icon-page">
<i class="icon-font i-v-right"></i>
</span>
</a>
{% else %}
<span class="icon-page">
<i class="icon-font i-v-right"></i>
</span>
{% endif %}
</p>
</nav>
</div>
</div>