-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
76 lines (68 loc) · 1.91 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
---
layout: default
---
<header class="header">
<div class="header-title">
<a href="{{ site.url }}{{ site.baseurl }}">{{ site.name }}</a>
</div>
<nav class="header-nav">
{% for nav in site.nav %}
{% if nav.url contains 'http://' or nav.url contains 'https://' %}
<a href="{{ nav.url }}">{{ nav.name }}</a>
{% else %}
<a href="{{ nav.url | prepend: site.baseurl }}">{{ nav.name }}</a>
{% endif %}
{% endfor %}
</nav>
</header>
<div class="list">
{% if site.posts.size == 0 %}
<h2>No post found</h2>
{% else %}
<!-- This loops through the paginated posts -->
{% for post in paginator.posts %}
<div class="list-post">
<img class="list-post-portrait" src="/images/profile/{{ site.authors[post.author].name }}.jpg">
{% if post.link %}
<a href="{{ post.link }}">
{% else %}
<a href="{{ post.url | prepend: site.baseurl }}">
{% endif %}
<div class="list-post-title">
{{ post.title }}
</div>
{% if post.description %}
<div class="list-post-desc">
{{ post.description }}
</div>
<span class="list-post-date">
<time>{{ post.date | date: "%Y년 %m월 %d일" }}</time>
</span>
<span class="list-post-author">
by {{ site.authors[post.author].display_name }}
</span>
{% endif %}
</a>
</div>
{% endfor %}
<!-- Pagination links -->
<div class="list-pagination">
<span class="list-pagination-previous">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="previous">
< previous
</a>
{% else %}
{% endif %}
</span>
<span class="list-pagination-next">
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="next">
next >
</a>
{% else %}
{% endif %}
</span>
</div>
{% endif %}
</div>