-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·43 lines (40 loc) · 1.24 KB
/
index.html
File metadata and controls
executable file
·43 lines (40 loc) · 1.24 KB
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
---
layout: default
title: 首页
---
{% for post in paginator.posts %}
{% capture y %}
{{post.date | date:"%Y"}}
{% endcapture %}
{% if year != y %}
{% if year %}
</ul>
{% endif %}
{% assign year = y %}
<h3>{{ y }}</h3>
<ul>
{% endif %}
<li class="listing-item">
<time datetime="{{ post.date | date:"%Y-%m-%d" }}">{{ post.date | date:"%Y-%m-%d" }}</time>
<a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
{% if paginator.total_pages > 1 %}
<ul class="pagination pagination-sm">
<li><a href="/">前一页</a></li>
{% if 1 == paginator.page %}
<li class="active"><a href="/"><span>1</span></a></li>
{% else %}
<li><a href="/"><span>1</span></a></li>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<li class="active"><span>{{count}}</span></li>
{% else %}
<li><a href="/page{{count}}"><span>{{count}}</span></a></li>
{% endif %}
{% endfor %}
<li><a href="/page{{paginator.total_pages}}">后一页</a></li>
</ul>
{% endif %}