forked from iluwatar/java-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.html
More file actions
87 lines (79 loc) · 3.1 KB
/
sidebar.html
File metadata and controls
87 lines (79 loc) · 3.1 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
<!-- Parameters:
- include.allItems: list of all items that have categories or tags
- include.categories: list of categories
- include.tags: list of tags
-->
{% include sortedlabels.html %}
<div class="row">
<div class="col-md-12 col-sm-6">
<div class="sidebar-list-header checkbox">
<input type="checkbox" id="checkbox_allcats" checked>
<label for="checkbox_allcats">
Categories
</label>
<span class="amount-badge">
{{ site.data.categories | size }}
</span>
</div>
{% for category in sortedCats %}
<div class="sidebar-list-item checkbox" category="{{ category.name }}"
<!-- add tooltip only if we have something to display -->
{% if category.description %}
data-toggle="tooltip" data-placement="left" title="{{ category.description }}"
{% endif %} <!-- /tooltip, close the a tag now --> >
<input type="checkbox" id="checkbox_{{ category.name }}" checked>
<label for="checkbox_{{ category.name }}">
<i class="{{ category.icon }}" aria-hidden="true"></i>
{{ category.name }}
<span class="amount-badge">
{% assign counter=0 %}
{% for page in include.allItems %}
{% if page.categories contains category.name %}
{% assign counter=counter | plus:1 %}
{% endif %}
{% endfor %}
{{ counter }}
</span>
</label>
</div>
{% endfor %}
</div>
<div class="col-md-12 col-sm-6 top20">
<div class="sidebar-list-header checkbox">
<input type="checkbox" id="checkbox_alltags" checked>
<label for="checkbox_alltags">
Tags
</label>
<span class="amount-badge">
{{ site.data.tags | size }}
</span>
</div>
<!-- All / None Buttons -->
<!--<div class="sidebar-list-item">
<div class="btn-group-sm centerContents" role="group">
<button id="allTagsButton" type="button" class="btn btn-primary" style="width: 40%;">All</button>
<button id="noTagsButton" type="button" class="btn btn-default" style="width: 40%;">None</button>
</div>
</div>-->
{% for tag in sortedTags %}
<div class="sidebar-list-item checkbox" tag="{{ tag.name }}" <!-- add tooltip only if we have something to display -->
{% if tag.description %}
data-toggle="tooltip" data-placement="left" title="{{ tag.description }}"
{% endif %} <!-- /tooltip, close the a tag now --> >
<input type="checkbox" id="checkbox_{{ tag.name }}" checked>
<label for="checkbox_{{ tag.name }}">
{{ tag.name }}
<span class="amount-badge">
{% assign counter=0 %}
{% for page in include.allItems %}
{% if page.tags contains tag.name %}
{% assign counter=counter | plus:1 %}
{% endif %}
{% endfor %}
{{ counter }}
</span>
</label>
</div>
{% endfor %}
</div>
</div>