-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.html
54 lines (49 loc) · 1.69 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
layout: index
title: Archive
permalink: /archive/
---
{% assign first_year = site.posts.last.date | date: "%Y" | plus: 0 %}
{% assign last_year = site.posts.first.date | date: "%Y" | plus: 0 %}
<div class="container">
<div class="row">
<aside class="col-md-3 aside-sticky">
<div class="card card-default small">
<ul class="list-group list-group-flush">
{% for year in (first_year..last_year) reversed %}
<a class="list-group-item list-group-item-action" href="#archive-{{ year }}">
{{ year }}
</a>
{% endfor %}
</ul>
</div>
<hr class="aside-hr"/>
</aside>
<section class="col-md-9">
<div class="h3 text-muted">All Posts</div>
{% for year in (first_year..last_year) reversed %}
<div class="card my-4">
<h2 class="h4 card-header" id="archive-{{ year }}">{{ year }}</h2>
<ul class="list-group list-group-flush">
{% for post in site.posts %}
{% assign post_year = post.date | date: "%Y" | plus: 0 %}
{% if post_year == year %}
<a class="list-group-item list-group-item-action" href="{{ post.url }}">
<h3 class="h6">
{{ post.title }}
{% if post.subtitle %}
<span class="muted small"> | {{ post.subtitle }}</span>
{% endif %}
</h3>
<span class="small pull-right">
{{ post.date | date: '%A, %B %-d, %Y'}}
</span>
</a>
{% endif %}
{% endfor %}
</ul>
</div>
{% endfor %}
</section>
</div>
</div>