-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
92 lines (79 loc) · 2.46 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
81
82
83
84
85
86
87
88
89
90
91
92
---
layout: default
---
{% if paginator.page == 1 %}
{% assign base_path = '.' %}
{% else %}
{% assign base_path = '..' %}
{% endif %}
<div class="posts">
<ul class="posts list-type-none">
{% for post in paginator.posts %}
{% if post.publish != false %}
<li class="post-item">
{% if post.author %}
<div class="post-author-info">
{% if post.author-email %}
<img class="portrait" src="{{base_path}}/images/profile/{{post.author-email}}.png" />
<h2 class="post-title"><a href="{{ base_path }}{{ post.url }}"><span class="post-title-words">{{ post.title }}</span></a></h2>
<p class="post-description">{{ post.description }}</p>
<span class="post-date">{{ post.date | date: "%Y-%m-%d" }}</span>
<span class="sep">|</span>
<span class="author-name"><a href="mailto:{{post.author-email}}">{{post.author}}</a></span>
{% else %}
<h2 class="post-title"><a href="{{ post.url }}"><span class="post-title-words">{{ post.title }}</span></a></h2>
<p class="post-description">{{ post.description }}</p>
<span class="post-date">{{ post.date | date: "%Y-%m-%d" }}</span>
<span class="sep">|</span>
<span class="author-name">{{post.author}}</span>
{% endif %}
</div>
{% endif %}
</li>
<div style="clear: both;"></div>
{% endif %}
{% endfor %}
</ul>
</div>
<div id="post-pagination" class="pagination clearfix">
{% if paginator.previous_page %}
<p class="previous">
{% if paginator.previous_page == 1 %}
<a href="/">Back</a>
{% else %}
<a href="/page{{paginator.previous_page}}">Back</a>
{% endif %}
</p>
{% else %}
<p class="previous disabled">
<span>Back</span>
</p>
{% endif %}
<ol class="pages">
<li class="page">
{% if paginator.page == 1 %}
<span class="current-page">1</span>
{% else %}
<a href="/">1</a>
{% endif %}
</li>
{% for count in (2..paginator.total_pages) %}
<li class="page">
{% if count == paginator.page %}
<span class="current-page">{{count}}</span>
{% else %}
<a href="/page{{count}}">{{count}}</a>
{% endif %}
</li>
{% endfor %}
</ol>
{% if paginator.next_page %}
<p class="next">
<a href="/page{{paginator.next_page}}">Next</a>
</p>
{% else %}
<p class="next disabled">
<span>Next</span>
</p>
{% endif %}
</div>