DRY tags_max
calculation in _layouts/tags.html (#1696)
It was being done twice, and it doesn't seem to need to be.
This commit is contained in:
parent
2bf2c83fea
commit
e366a9a72b
1 changed files with 7 additions and 13 deletions
|
@ -4,13 +4,14 @@ layout: archive
|
|||
|
||||
{{ content }}
|
||||
|
||||
{% assign tags_max = 0 %}
|
||||
{% for tag in site.tags %}
|
||||
{% if tag[1].size > tags_max %}
|
||||
{% assign tags_max = tag[1].size %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<ul class="taxonomy__index">
|
||||
{% assign tags_max = 0 %}
|
||||
{% for tag in site.tags %}
|
||||
{% if tag[1].size > tags_max %}
|
||||
{% assign tags_max = tag[1].size %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for i in (1..tags_max) reversed %}
|
||||
{% for tag in site.tags %}
|
||||
{% if tag[1].size == i %}
|
||||
|
@ -24,13 +25,6 @@ layout: archive
|
|||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% assign tags_max = 0 %}
|
||||
{% for tag in site.tags %}
|
||||
{% if tag[1].size > tags_max %}
|
||||
{% assign tags_max = tag[1].size %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for i in (1..tags_max) reversed %}
|
||||
{% for tag in site.tags %}
|
||||
{% if tag[1].size == i %}
|
||||
|
|
Loading…
Reference in a new issue