Repository navigation
Expand file tree
/
Copy patharchive.html
More file actions
59 lines (48 loc) · 1.63 KB
/
Copy patharchive.html
File metadata and controls
59 lines (48 loc) · 1.63 KB
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
---
title: Archive
permalink: "archive/index.html"
---
<div class="page-archive">
<div class="sortcontrol">
<p>Blog sort:
<span id="blogsort" class="btn-group btn-toggle">
<button id="sortdate" class="btn btn-xs btn-default">Date</button>
<button id="sorttopic" class="btn btn-xs btn-success active">Topic</button>
</span>
</p>
</div>
<div id="postdate" style="display: none;">
{% for post in site.posts %}
{% assign post_month_year = post.date | date: "%B %Y" %}
{% assign newer_post_month_year = post.next.date | date: "%B %Y" %}
{% if post_month_year != newer_post_month_year %}
<h3 class="section-header-archive">{{ post_month_year }}</h3>
{% endif %}
<p>
<a href="{{ post.url | prepend:site.baseurl}}" class="post-title-archive">{{ post.title }}</a>
<small class="text-muted">{{ post.date | date_to_string }}</small>
</p>
{% endfor %}
</div>
<div id="posttopic">
{% capture tags %}
{% for tag in site.tags %}
{{ tag[0] }},
{% endfor %}
{% endcapture %}
{% assign sortedtags = tags | split:',' | sort_natural %}
{% for tag in sortedtags %}
{% assign tag2 = tag | strip %}
{% if tag2 == blank %}
{% continue %}
{% endif %}
<h3 class="section-header-archive" id="{{ tag2 }}">{{ tag2 }}</h3>
{% for post in site.tags[tag2] %}
<p>
<a href="{{ post.url | prepend:site.baseurl}}" class="post-title-archive">{{ post.title }}</a>
<small class="text-muted">{{ post.date | date_to_string }}</small>
</p>
{% endfor %}
{% endfor %}
</div>
</div>