-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharchive.haml
37 lines (36 loc) · 1.18 KB
/
archive.haml
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
---
layout: default
title: base0.net - Post Archive
---
.archive
%h2 Post Archive
%table
{% assign last_post_year = "" %}
{% assign last_post_month = "" %}
{% assign last_post_day = "" %}
{% for post in site.posts %}
%tr
%td
{% capture this_post_year %}{{ post.date | date_year }}{% endcapture %}
{% if last_post_year != this_post_year %}
{{ post.date | date_year }}
{% assign last_post_year = this_post_year %}
{% endif %}
%td
{% capture this_post_month %}{{ post.date | date_month }}{% endcapture %}
{% if last_post_month != this_post_month %}
{{ post.date | date_month }}
{% assign last_post_month = this_post_month %}
{% endif %}
%td
{% capture this_post_day %}{{ post.date | date_day }}{% endcapture %}
{% if last_post_day != this_post_day %}
{{ post.date | date_day }}
{% assign last_post_day = this_post_day %}
{% endif %}
%td
%a{:href => "{{post.url}}"} {{ post.title }}
%td.comments
%a.comment-link{:href => "{{post.url}}/#disqus_thread"} Comments
{% endfor %}
{% include disqus_comment_links.html %}