- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory.html
More file actions
Latest commit
40 lines (35 loc) · 1.52 KB
/
Copy pathcategory.html
File metadata and controls
40 lines (35 loc) · 1.52 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
---
layout: page
title: Category
permalink: /category/
---
<div><style>button { margin-bottom:10px; }</style>
<buttonclass="waves-effect waves-light btn" onClick="expandAll();"><iclass="mdi mdi-chevron-double-down left"></i>Expand</button>
<buttonclass="waves-effect waves-light btn" onClick="collapseAll();"><iclass="mdi mdi-chevron-double-up left"></i>Collapse</button>
</div>
{% capture categories %}
{% for c in site.categories %}{{ c | first }}{% unless forloop.last %},{% endunless %}{% endfor %}
{% endcapture %}
{% assign category_names = categories | strip | split:',' | sort %}
<divclass="post-category">
{% for cate in category_names %}
<aid="{{ cate }}" class="section scrollspy"></a><!-- TODO for position-->
<ulclass="collapsible" data-collapsible="expandable">
<li>
<divclass="collapsible-header active">
<spanclass="capitalize" style="font-size: 18px;">{{ cate }}</span>
<aclass="waves-circle btn-floating right waves-effect waves-green white"><spanclass="pink-text">{{ site.categories[cate].size }}</span></a>
</div>
<divclass="collapsible-body">
{% for post in site.categories[cate] %}{% if post.title != null %}
<ul>
<li>
{{ post.date | date: "%Y-%m-%d" }} >> <aclass="category-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
</ul>
{% endif %}{% endfor %}
</div>
</li>
</ul>
{% endfor %}
</div>