-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
executable file
·51 lines (47 loc) · 1.56 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
---
layout: default
title: Home
---
<ul class="posts">
{% for post in paginator.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}
<li itemscope>
{% if post.type != '' %}
<a href="{{ post.url | relative_url }}">{{ post.type }} | {{ post.title }}</a>
{% else %}
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% endif %}
<p class="post-date">
<span>
{% include date.html date=post.date %}
</span>
{% comment %}
<span>{% include read-time.html %}</span>
{% endcomment %}
</p>
</li>
{% endfor %}
</ul>
<!-- Pagination links -->
{% if paginator.next_page or paginator.previous_page %}
<div class="pagination">
{% if paginator.previous_page %}
<a class="pagination-button pagination-active" href="{{ paginator.previous_page_path | relative_url }}">{% t pagination.previous_page %}</a>
{% else %}
<span class="pagination-button">{% t pagination.previous_page %}</span>
{% endif %}
{% if paginator.next_page %}
<a class="pagination-button pagination-active next" href="{{ paginator.next_page_path | relative_url }}">{% t pagination.next_page %}</a>
{% else %}
<span class="pagination-button">{% t pagination.next_page %}</span>
{% endif %}
</div>
{% endif %}