forked from aweekj/kiko-now
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
95 lines (79 loc) · 2.33 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
93
94
95
---
layout: default
---
{% if site.posts.size == 0 %}
<h2>No post found</h2>
{% endif %}
<div class="posts">
{% if paginator.page == 1 %}
{% include algolia.html %}
{% endif %}
{% for post in paginator.posts %}
<article class="post">
<h1>
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h1>
<div>
<span class="date">
{{ post.date | date: "%Y-%m-%d" }}
</span>
<!-- Look the author details up from the site config. -->
{% assign author = site.data.authors[post.author] %}
{% if author %}
<span>
<!-- Personal Info. -->
作者: <a href="{{ author.web }}">{{ author.name }}</a>
</span>
{% endif %}
<ul class="tag">
{% for tag in post.tags %}
<li>
<a href="{{ site.url }}{{ site.baseurl }}/tags#{{ tag }}">
{{ tag }}
</a>
</li>
{% endfor %}
</ul>
{% if post.from %}
<span>
<!-- Personal Info. -->
<a href="{{ post.from }}">来源</a>
</span>
{% endif %}
{% if post.hackmd %}
<span>
<!-- Personal Info. -->
MD: <a href="https://hackmd.io/{{ post.hackmd }}?view">逐段点评</a>
</span>
{% endif %}
</div>
<div class="entry">
{{ post.excerpt }}
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endfor %}
</div>
<div class="pagination">
{% if paginator.previous_page %}
<span class="prev">
<a href="{{ site.baseurl }}{{ paginator.previous_page_path }}" class="prev">
上一页
</a>
</span>
{% endif %}
{% if paginator.next_page %}
<span class="next">
<a href="{{ site.baseurl}}{{ paginator.next_page_path }}" class="next">
下一页
</a>
</span>
{% endif %}
<script>
/* post pagination keyboard shortcuts */
document.body.onkeyup = function(e){
if (e.keyCode == '122') { window.location = '{{ site.baseurl }}{{ paginator.previous_page_path }}'; } // left arrow key
if (e.keyCode == '123') { window.location = '{{ site.baseurl}}{{ paginator.next_page_path }}'; } // right arrow key
};
</script>
</div>