Repository navigation
Expand file tree
/
Copy pathtags.html
More file actions
87 lines (79 loc) · 3.48 KB
/
Copy pathtags.html
File metadata and controls
87 lines (79 loc) · 3.48 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
layout: default
title: Tags
navorder: 4
---
<!--Content Area Start-->
<div id="content">
<div class="container">
<div class="divider-info ptb">
<div class="page-header-title">
<h2 class="heading-title text-center">{{ page.title }}</h2>
</div>
</div>
<div class="row">
<div class="col">
<!-- Tags (as filter) -->
<div id='tag_cloud' class="tags tags-sup js-tags">
<a class="tag-button--all" data-encode="">
Show All
<sup>{{site.posts.size}}</sup>
</a>
{% capture tags %}
{% for tag in site.tags %}
<a data-sort="{{ site.posts.size | minus: tag[1].size | prepend: '0000' | slice: -4, 4 }}"
data-encode="{{ tag[0] | strip | url_encode }}"
class="tag-button"
title="{{ tag[0] }}" rel="{{ tag[1].size }}">
{{ tag[0] }}
<sup>{{tag[1].size}}</sup>
</a>
{% endfor %}
{% endcapture %}
{{ tags | split:'</a>' | sort | join:'</a>' }}
</div>
<!-- Article List -->
<div class="mini-post-list js-result d-none">
{% assign _sorted_list = site.posts %}
{% assign _sorted_list = _sorted_list | sort: 'date' %}
{% assign _sorted_list = _sorted_list | reverse %}
{% for _article in _sorted_list %}
{% assign _tags = '' %}
{% for _tag in _article.tags %}
{% assign _tag_encode = _tag | strip | url_encode %}
{% if forloop.last %}
{% assign _tags = _tags | append: _tag_encode %}
{% else %}
{% assign _tags = _tags | append: _tag_encode | append: ',' %}
{% endif %}
{% endfor %}
{% comment %} group by year {% endcomment %}
{% assign _currentdate = _article.date | date: '%Y' %}
{% if _currentdate != _date %}
{% unless forloop.first %}</section>{% endunless %}
<section>
<span class="fa listing-seperator">
<span class="tag-text">{{ _currentdate }}</span>
</span>
{% assign _date = _currentdate %}
{% endif %}
<div class="post-preview item" data-tags="{{ _tags }}">
<a href="{{ _article.url | prepend: site.baseurl }}">
<h2 class="post-title">
{{ _article.title }}
</h2>
</a>
{% if _article.excerpt %}
<h3 class="post-subtitle">
{{ _article.excerpt }}
</h3>
{% endif %}
<i class="text-muted">Posted on {{ _article.date | date_to_string }} in category <a href="#">{{_article.category}}</a></i>
<hr>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>