-
Notifications
You must be signed in to change notification settings - Fork 0
/
browse.html
40 lines (36 loc) · 1.19 KB
/
browse.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
---
title: "Browse"
layout: archive
author_profile: true
classes: wide
---
{% assign categories_max = 0 %}
{% for category in site.categories %}
{% if category[1].size > categories_max %}
{% assign categories_max = category[1].size %}
{% endif %}
{% endfor %}
<ul class="taxonomy__index" style="grid-template-columns: repeat(1,1fr);">
{% for i in (1..categories_max) reversed %}
{% for category in site.categories %}
{% if category[1].size == i %}
<li>
<a href="{{ site.baseurl }}{{ category[0] }}">
<strong>{{ category[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
</a>
{% assign alltags = category[1] | sort %}
{% assign grouptag = alltags | map: 'tags' | join: ',' | split: ',' | group_by: tag %}
<ul class="taxonomy__index">
{% for tag in grouptag %}
<li>
<a href="{{ site.baseurl }}{{ tag.name }}">
<strong>{{ tag.name }}</strong> <span class="taxonomy__count">{{ tag.size }}</span>
</a>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>