-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcates.html
69 lines (61 loc) · 3.37 KB
/
cates.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
{{template "header.html" .}}
<div id="main-wrapper">
<div id="main">
<div class="row">
<div class="col-12 col-lg-11 col-xl-8">
<div id="page" class="post pb-5 pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4 mb-md-4">
<h1 class="dynamic-title">Categories</h1>
<div class="post-content">
{{range $group_index, $cate := $.cates}}
<div class="card categories">
<!-- top-category -->
<div id="h_{{ $group_index }}" class="card-header d-flex justify-content-between hide-border-bottom">
<span>
<i class="far fa-folder fa-fw"></i>
<a href="{{$.cateUrl}}/{{$cate.UrlTitle}}" class="ml-1 mr-2">{{$cate.Title}}</a>
<span class="text-muted small font-weight-light">
{{if gt $cate.SubCateCount 0}} {{$cate.SubCateCount}} categories, {{end}} {{$cate.CateCount}} posts
</span>
</span>
<!-- arrow -->
{{ if gt $cate.SubCateCount 0 }}
<a href="#l_{{ $group_index }}" data-toggle="collapse"
aria-expanded="true" aria-label="h_{{ $group_index }}-trigger"
class="category-trigger hide-border-bottom">
<i class="fas fa-fw fa-angle-down"></i>
</a>
{{ else }}
<span data-toggle="collapse" class="category-trigger hide-border-bottom disabled">
<i class="fas fa-fw fa-angle-right"></i>
</span>
{{ end }}
</div> <!-- .card-header -->
<!-- Sub-categories -->
{{ if gt $cate.SubCateCount 0 }}
<div id="l_{{ $group_index }}" class="collapse show" aria-expanded="true">
<ul class="list-group">
{{ range $cate.SubCates }}
<li class="list-group-item">
<i class="far fa-folder fa-fw"></i>
<a href="{{$.cateUrl}}/{{.UrlTitle}}" class="ml-1 mr-2">{{ .Title }}</a>
<span class="text-muted small font-weight-light">{{ .CateCount }} posts</span>
</li>
{{ end }}
</ul>
</div>
{{ end }}
</div> <!-- .card -->
{{end}}
</div> <!-- .post-content -->
</div> <!-- #page -->
</div>
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted topbar-down">
{{template "post-update-list-trending-tags.html" .}}
</div> <!-- panel-wrapper -->
</div> <!-- .row -->
{{template "footer.html" .}}
</div> <!-- #main -->
</div> <!-- #main-wrapper -->
{{template "back-to-top.html" .}}
</body>
</html>