-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
71 lines (65 loc) · 2.26 KB
/
Copy pathindex.html
File metadata and controls
71 lines (65 loc) · 2.26 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
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
---
layout: index
title: CSSForest.org
---
<h2 class="none">文章列表</h2>
{% for post in paginator.posts %}
{% if post.published %}
{% capture y %}{{post.date | date:"%Y"}}{% endcapture %}
{% if year != y %}
{% if year == null %}
<section>
{% assign n = y %}
{% else %}
{% if n != y %}
</section>
{% endif %}
<section>
{% endif %}
{% assign year = y %}
<h3 class="listing-seperator">{{ y }}</h3>
{% endif %}
<section class="listing {% if post.update %}update{% endif %}">
<h4><a href="{{ post.url }}" title="{{ post.title | escape }}">{{ post.title }}</a></h4>
<p class="post-info">
{% if post.update %}
<span class="date-update"><span>更新时间:</span><time itemprop="dateUpdate" datetime="{{ post.update | date:'%Y-%m-%d' }}">{{ post.update | date:"%Y-%m-%d" }}</time></span>
{% endif %}
<span class="date-published"><span>发布时间:</span><time itemprop="datePublished" datetime="{{ post.date | date:'%Y-%m-%d' }}">{{ post.date | date:"%Y-%m-%d" }}</time></span>
</p>
{% if site.truncate %}
<p>{{ post.content | strip_html | truncate: site.truncate }}</p>
{% endif %}
</section>
{% endif %}
{% endfor %}
</section>
<div id="post-pagination" class="paginator">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a href="/"><前页</a>
{% else %}
<a href="/page{{paginator.previous_page}}"><前页</a>
{% endif %}
{% else %}
<span class="previous disabled"><前页</span>
{% endif %}
{% if paginator.page == 1 %}
<span class="current-page">1</span>
{% else %}
<a href="/">1</a>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<span class="current-page">{{count}}</span>
{% else %}
<a href="/page{{count}}">{{count}}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a class="next" href="/page{{paginator.next_page}}">后页></a>
{% else %}
<span class="next disabled" >后页></span>
{% endif %}
(共{{ paginator.total_posts }}篇)
</div>