-
Notifications
You must be signed in to change notification settings - Fork 417
/
index.html
79 lines (72 loc) · 1.88 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
---
layout: default
title: "首页:Home"
---
<!--
<h1 class="page-header">
<small>
{{ site.description }}
</small>
</h1>
-->
<!-- Loop output paged posts -->
<div id="index" class="row">
<div class="post-area">
<div class="post-list-body">
<div post-cate="All">
<ul class="posts">
{% for post in paginator.posts %}
<li>
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<span class="date">{{ post.date | date_to_string }}</span>
<hr>
<p>{% if post.excerpt.size > 32 %}{{ post.excerpt }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 160 }}{% endif %}</p>
<p> <a href="{{ post.url }}"><span >阅读全文 » </span></a></p>
<hr>
</li>
{% endfor %}
</ul>
<!-- Pager indicator -->
<ul class="pager">
{% if paginator.previous_page %} {% if paginator.previous_page == 1 %}
<li class="previous">
<a href="{{ site.url }}/">
← Older
</a>
</li>
{% else %}
<li class="previous">
<a href="{{ site.url }}/page{{ paginator.previous_page }}">
← Older
</a>
</li>
{% endif %} {% endif %} {% if paginator.next_page %}
<li class="next">
<a href="{{ site.url }}/page{{ paginator.next_page }}">
Newer →
</a>
</li>
{% endif %}
</ul>
</div>
{% for category in site.categories %}
<div post-cate="{{category | first}}">
<ul class="posts">
{% for posts in category %}
{% for post in posts %}
{% if post.url %}
<li>
<a href="{{ post.url }}" class="post-list-item">
<h2>{{ post.title }}</h2>
<span class="date">{{ post.date | date: "%b %-d, %Y" }}</span>
</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
</div>