-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (42 loc) · 1.02 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
---
layout: default
---
<div class="home">
<div class="wrapper">
<h1 class="page-title">
Blog of @jacmendt
</h1>
<div class="page">
<div class="post-content">
{% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
<!-- If the list starts here -->
{% if forloop.first %}
<h2>{{this_year}}</h2>
<ul class="posts-list">
{% endif %}
<li>
<h4>
<strong>
<a href="{{ post.url }}">{{ post.title }}</a>
</strong>
<span class="post-date">- {{ post.date | date_to_long_string }}</span>
</h4>
</li>
<!-- If the list ends here -->
{% if forloop.last %}
</ul>
{% else %}
<!-- New year starts -->
{% if this_year != next_year %}
</ul>
<h2>{{next_year}}</h2>
<ul class="posts-list">
{% endif %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>