-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
executable file
·79 lines (74 loc) · 2.06 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
---
layout: index
title: Tommy's Blog
---
{% include codepiano/setup %}
<!-- 按照分页插入博客文章 -->
{% for post in paginator.posts %}
<h2 class="title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
<div class="post_info">
{% unless post.categories == empty %}
<ul id="post_info" class="tag_box inline">
<li><i class="fa fa-calendar"></i></li>
<li id="post-date">{{ post.date | date: " %Y 年 %m 月 %d 日" }}</li>
<li><i class="fa fa-folder-open"></i></li>
{% assign post_categories = post.categories %}
{% include codepiano/post_categories_info %}
</ul>
{% endunless %}
<span>
</div>
<div class="archive">
{{ post.excerpt }}
</div>
<hr />
{% endfor %}
<!-- 分页页码展示 -->
<div id="post-pagination">
<ul class="pagination pagination-centered pull-right">
<!-- 上一页按钮 -->
{% if paginator.previous_page %}
<li>
{% if paginator.previous_page == 1 %}
<a href="/"><i class="fa fa-chevron-left"></i></a>
{% else %}
<a href="/page{{ paginator.previous_page }}"><i class="fa fa-chevron-left"></i></a>
{% endif %}
</li>
{% else %}
<li class="disabled">
<span><i class="fa fa-chevron-left"></i></span>
</li>
{% endif %}
<!-- 第一页,访问根目录 -->
{% if paginator.page == 1 %}
<li class="active">
<a href="#">1</a>
</li>
{% else %}
<li>
<a href="/">1</a>
</li>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<li class="active">
<a href="#">{{ count }}</a>
</li>
{% else %}
<li>
<a href="/page{{ count }}">{{ count }}</a>
</li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li>
<a href="/page{{ paginator.next_page }}"><i class="fa fa-chevron-right"></i></a>
</li>
{% else %}
<li class="disabled">
<a href="#"><i class="fa fa-chevron-right"></i></a>
</li>
{% endif %}
</ul>
</div>