forked from tgist/tgist.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.html
38 lines (34 loc) · 1.18 KB
/
archive.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
---
title: Archive
layout: page
---
{% for post in site.posts %}
{% capture year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture month %}{{ post.date | date: "%b" }}{% endcapture %}
{% capture nyear %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% capture nmonth %}{{ post.previous.date | date: "%b" }}{% endcapture %}
{% if forloop.first %}
<div class="timeline">
<h4 class="tl-year hidden-xs">Year {{ year }}</h4>
<h5 class="tl-month hidden-xs">{{ month }}</h5>
<ul class="tl-content">
{% endif %}
<li class="tl-title"><span>{{ post.date | date: "%Y - %m - %d" }}</span> » <a href="{{ post.url }}">{{ post.title }}</a></li>
{% if forloop.last %}
</ul>
{% else %}
{% if year != nyear %}
</ul>
<h4 class="tl-year hidden-xs">Year {{ nyear }}</h4>
<h5 class="tl-month hidden-xs">{{ nmonth }}</h5>
<ul class="tl-content">
{% else %}
{% if month != nmonth %}
</ul>
<h5 class="tl-month hidden-xs">{{ nmonth }}</h5>
<ul class="tl-content">
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</div>