-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategories.html
114 lines (106 loc) · 3.65 KB
/
categories.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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
layout: default
title: Categories
description: "文章分类"
header-img: "img/categories-bg.jpg"
---
<style type="text/css">
#accordion .panel-body li{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
#accordion .panel-title>a{
text-transform:uppercase;
}
</style>
<!-- Page Header -->
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="site-heading" id="tag-heading">
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
<span class="subheading">{{ page.description }}</span>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container">
<div class="row">
<!-- list Content -->
<div class="col-lg-8 col-lg-offset-1 col-md-10 col-md-offset-1">
<!-- 标签云 -->
<div id='tag_cloud' class="tags">
{% for category in site.categories %}
<a href="#{{ category[0] }}" title="{{ category[0] }}" rel="{{ category[1].size }}">{{ category[0] }}</a>
{% endfor %}
</div>
<!-- 标签列表 -->
{% for category in site.categories %}
<div class="one-tag-list">
<span class="fa fa-folder listing-seperator text-success" id="{{ category[0] }}">
<span class="tag-text">{{ category[0] }}</span>
<span class="badge badge-success">{{ category[1].size }}</span>
</span>
<div>
{% for post in category[1] %}
<div class="post-preview">
<a href="{{ post.url | prepend: site.baseurl }}">
<h2 class="post-title">
{{ post.title }}
<time class="small" datetime="{{ post.date | date:'%Y-%m-%d' }}">{{ post.date | date:"%Y-%m-%d" }}</time>
</h2>
{% if post.subtitle %}
<!-- <h3 class="post-subtitle">
{{ post.subtitle }}
</h3> -->
{% endif %}
</a>
<!-- <p class="post-meta">{{ post.date | date:"%Y-%m-%d" }}</p> -->
</div>
<hr>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
<!-- side Content -->
<div class="col-sm-3 col-xs-5 panel-group" >
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="false">
{% for category in site.categories %}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading-{{category[0]}}">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-{{category[0]}}" aria-expanded="false" aria-controls="collapse-{{category[0]}}">
{{ category[0] | capitalize }}
<span class="badge pull-right">{{ category[1].size }}</span>
</a>
</h4>
</div>
<div id="collapse-{{category[0]}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{category[0]}}">
<div class="panel-body">
<ul class="list-unstyled">
{% assign pages_list = category[1] %}
{% for node in pages_list %}
{% if node.title != null %}
{% if group == null or group == node.group %}
<li>
<a href="{{ site.BASE_PATH }}{{node.url}}">{{node.title}}</a>
<!-- <span class="text-muted small"> » {{ node.date | date: "%F" }}</span> -->
</li>
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
</ul>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>