-
-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathindex.html
38 lines (36 loc) · 1.42 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
---
layout: default
---
{% capture date_format %}%Y{% t date.year %}%m{% t date.month %}%d{% t date.day %}{% endcapture %}
<div class="home">
<h1>{% t titles.article %}</h1>
{% for post in paginator.posts %}
<section>
<div class="article">
<header>
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
</header>
<p>{{ post.content | markdownify | strip_html | truncate: 120}}</p>
<div class="post-meta">
<span class="post-date">{{ post.date | date: date_format }}</span>
</div>
</div>
</section>
{% endfor %}
<!-- Pagination links -->
<nav>
<div class="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a href="{{ site.baseurl }}/" class="previous">{% t pagination.prev %}</a>
{% else %}
<a href="{{ site.baseurl }}/page/{{ paginator.previous_page }}/" class="previous">{% t pagination.prev %}</a>
{% endif %}
{% endif %}
<span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a href="{{ site.baseurl }}/page/{{ paginator.next_page }}/" class="next" rel="next">{% t pagination.next %}</a>
{% endif %}
</div>
</nav>
</div>