forked from chesterhow/tale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
40 lines (34 loc) · 1.18 KB
/
home.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
---
layout: default
---
<div class="catalogue">
{% for post in paginator.posts %}
<a href="{{ post.url | prepend: site.baseurl }}" class="catalogue-item">
<div>
<time datetime="{{ post.date }}" class="catalogue-time">{{ post.date | date: "%m/%d/%Y" }}</time>
<h1 class="catalogue-title">{{ post.title }}</h1>
<div class="catalogue-line"></div>
{% if post.preview %}
<p></p>
<img src="{{ site.baseurl }}/{{ post.preview }}"/>
{% endif %}
<p>
{% if post.content contains '<!--excerpt-->' %}
{{ post.content | split:'<!--excerpt-->' | shift | first | truncatewords: 40 }}
{% else %}
{{ post.content | strip_html | truncatewords: 40 }}
{% endif %}
</p>
</div>
</a>
{% endfor %}
</div>
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="left arrow">←</a>
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="right arrow">→</a>
{% endif %}
<span>{{ paginator.page }}</span>
</div>