-
Notifications
You must be signed in to change notification settings - Fork 0
/
posts-taxonomy.html
37 lines (35 loc) · 1.23 KB
/
posts-taxonomy.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
{% assign items_max = 0 %}
{% for item in include.taxonomies %}
{% if item[1].size > items_max %}
{% assign items_max = item[1].size %}
{% endif %}
{% endfor %}
<ul class="taxonomy__index">
{% for i in (1..items_max) reversed %}
{% for item in include.taxonomies %}
{% if item[1].size == i %}
<li>
<a href="#{{ item[0] | slugify }}">
<strong>{{ item[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
{% assign entries_layout = page.entries_layout | default: 'list' %}
{% for i in (1..items_max) reversed %}
{% for taxonomy in include.taxonomies %}
{% if taxonomy[1].size == i %}
<section id="{{ taxonomy[0] | slugify }}" class="taxonomy__section">
<h2 class="archive__subtitle">{{ taxonomy[0] }}</h2>
<div class="entries-{{ entries_layout }}">
{% for post in taxonomy.last %}
{% include archive-single.html type=entries_layout %}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
</section>
{% endif %}
{% endfor %}
{% endfor %}