-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·57 lines (51 loc) · 1.79 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
---
layout: default
---
<div class="main-post-list hidden">
<ol class="post-list">
{% for post in paginator.posts %}
<li>
<h2 class="post-list__post-title post-title"><a href="{{ site.BASE_PATH }}{{ post.url }}" title="link to {{ post.title }}">{{ post.title }}</a></h2>
<p class="excerpt">
{% if post.fullview %}
{{ post.content }}
{% else %}
{% if post.shortinfo %}
{{ post.shortinfo }}
{% elsif post.description %}
{{ post.description }}
{% else %}
{{ post.excerpt | remove: '<p>' | remove: '</p>' }}
{% endif %}
{% endif %}…</p>
<div class="post-list__meta"><time datetime="{% assign d = post.date | date: "%d" | plus:'0' %}
{{ post.date | date: "%B" }}
{% case d %}
{% when 1 or 21 or 31 %}{{ d }}st,
{% when 2 or 22 %}{{ d }}nd,
{% when 3 or 23 %}{{ d }}rd,
{% else %}{{ d }}th,
{% endcase %}
{{ post.date | date: "%Y" }}" class="post-list__meta--date date">{% assign d = post.date | date: "%d" | plus:'0' %}
{{ post.date | date: "%B" }}
{% case d %}
{% when 1 or 21 or 31 %}{{ d }}st,
{% when 2 or 22 %}{{ d }}nd,
{% when 3 or 23 %}{{ d }}rd,
{% else %}{{ d }}th,
{% endcase %}
{{ post.date | date: "%Y" }}</time> •
<!--循环开始-->
{% assign categories_list = post.categories %}
{% for category in categories_list %}
<span class="post-list__meta--tags tags">
<a href="/category/{{ category }}/#blog" title="{{ category }}">{{ category }}</a></span>
{% endfor %}
<!--循环结束-->
<a class="btn-border-small" href="{{ site.BASE_PATH }}{{ post.url }}"}>继续阅读</a></div>
<hr class="post-list__divider" />
</li>
{% endfor %}
</ol>
{% include pagination.html %}
</div>