forked from tmallfe/tmallfe.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtags.html
39 lines (35 loc) · 1.47 KB
/
tags.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
---
layout: page
title: Tags
header: Posts By Tag
group: navigation
---
{% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign tag_words = site_tags | split:',' | sort %}
<div class="col-sm-3 col-xs-6">
<ul class="nav nav-tabs-vertical cat-tag-menu">
{% for item in (0..site.tags.size) %}{% unless forloop.last %}
{% capture this_word %}{{ tag_words[item] | strip_newlines }}{% endcapture %}
<li>
<a href="#{{ this_word | replace:' ','-' }}-ref">
{{ this_word }}<span class="badge pull-right">{{ site.tags[this_word].size }}</span>
</a>
</li>
{% endunless %}{% endfor %}
</ul>
</div>
<!-- Tab panes -->
<div class="tab-content col-sm-9 col-xs-6">
{% for item in (0..site.tags.size) %}{% unless forloop.last %}
{% capture this_word %}{{ tag_words[item] | strip_newlines }}{% endcapture %}
<div class="tab-pane" id="{{ this_word | replace:' ','-' }}-ref">
<h2 style="margin-top: 0px">Posts tagged with {{ this_word }}</h2>
<ul class="list-unstyled">
{% for post in site.tags[this_word] %}{% if post.title != null %}
<li style="line-height: 35px;"><a href="{{ site.BASE_PATH }}{{post.url}}">{{post.title}}</a> <span class="text-muted">- {{ post.date | date: "%B %d, %Y" }}</span></li>
{% endif %}{% endfor %}
</ul>
</div>
{% endunless %}{% endfor %}
</div>
<div class="clearfix"></div>