-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtimeline.html
47 lines (45 loc) · 1.62 KB
/
timeline.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
---
layout: main
title: "MewX's Timeline"
---
{% assign count = 0 %}
{% for post in site.posts %}
{% if forloop.first %}
{% capture saved_month %}{{ post.date | date: "%Y-%m" }}{% endcapture %}
{% assign count = 1 %}
<div class="post-preview">
{% else %}
{% capture this_month %}{{ post.date | date: "%Y-%m" }}{% endcapture %}
{% if this_month == saved_month %}
{% assign count = count | plus: 1 %}
{% else %}
<h2 class="post-title" name="{{ saved_month }}">
{{ saved_month }} ( {{ count }} )
</h2>
<hr>
{% for post2 in site.posts %}
{% capture this_month2 %}{{ post2.date | date: "%Y-%m" }}{% endcapture %}
{% if this_month2 == saved_month %}
<a href="{{ post2.url }}"><h3 class="post-subtitle">{{ post2.date | date: "%Y-%m-%d" }} | {{ post2.title }}</h3></a><br>
{% endif %}
{% endfor %}
</div>
{% assign count = 1 %}
{% capture saved_month %}{{ post.date | date: "%Y-%m" }}{% endcapture %}
<div class="post-preview">
{% endif %}
{% endif %}
{% if forloop.last %}
<h2 class="post-title" name="{{ saved_month }}">
{{ saved_month }} ( {{ count }} )
</h2>
<hr>
{% for post2 in site.posts %}
{% capture this_month2 %}{{ post2.date | date: "%Y-%m" }}{% endcapture %}
{% if this_month2 == saved_month %}
<a href="{{ post2.url }}"><h3 class="post-subtitle">{{ post2.date | date: "%Y-%m-%d" }} | {{ post2.title }}</h3></a><br>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}