-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
48 lines (43 loc) · 1.5 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
---
layout: default
title: Blog
---
<div class="content">
{% if paginator.total_posts > 0 %}
{% for post in paginator.posts %}
<article onclick="window.location.href = '{{ post.url }}'">
<h3>
<a class="post-title" href="{{ post.url }}">
{{ post.title }}
</a>
</h3>
{{ post.date | date: "%m/%d/%Y" }}
<p>
{{ post.content | truncatewords: 50 }}
<a href="{{ post.url }}" class="read-more">Read more</a>
</p>
</article>
{% endfor %}
{% else %}
<h1>Posts coming soon!</h1>
{% endif %}
<div class="pagination">
{% if paginator.total_pages > 1 %}
<div class="pagination-item previous">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}">« Previous</a>
{% endif %}
</div>
<div class="pagination-item">
{% if paginator.previous_page and paginator.next_page %}
|
{% endif %}
</div>
<div class="pagination-item next">
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}/">Next »</a>
{% endif %}
</div>
{% endif %}
</div>
</div>