mirror of
https://github.com/Decentralized-ID/decentralized-id.github.io.git
synced 2024-12-16 19:14:33 -05:00
sort tags, don't print with only 1 tag
This commit is contained in:
parent
ea011e2093
commit
b8b0b5137b
@ -5,7 +5,8 @@ layout: archive
|
||||
{{ content }}
|
||||
|
||||
{% assign tags_max = 0 %}
|
||||
{% for tag in site.tags %}
|
||||
{% assign sortedtags = site.tags | sort %}
|
||||
{% for tag in sortedtags %}
|
||||
{% if tag[1].size > tags_max %}
|
||||
{% assign tags_max = tag[1].size %}
|
||||
{% endif %}
|
||||
@ -13,20 +14,22 @@ layout: archive
|
||||
|
||||
<ul class="taxonomy__index">
|
||||
{% for i in (1..tags_max) reversed %}
|
||||
{% for tag in site.tags %}
|
||||
{% for tag in sortedtags %}
|
||||
{% if tag[1].size == i %}
|
||||
<li>
|
||||
<a href="#{{ tag[0] | slugify }}">
|
||||
<strong>{{ tag[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% unless tag[1].size == 1 %}
|
||||
<li>
|
||||
<a href="#{{ tag[0] | slugify }}">
|
||||
<strong>{{ tag[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% for i in (1..tags_max) reversed %}
|
||||
{% for tag in site.tags %}
|
||||
{% for tag in sortedtags %}
|
||||
{% if tag[1].size == i %}
|
||||
{% unless tag[1].size == 1 %}
|
||||
<section id="{{ tag[0] | slugify | downcase }}" class="taxonomy__section">
|
||||
|
Loading…
Reference in New Issue
Block a user