template: fix tag size when tag count > 10

This commit is contained in:
Skia 2023-10-18 00:59:55 +02:00
parent 8e465a7470
commit 65e479432c

View file

@ -7,7 +7,8 @@
·
{% for tag in terms %}
<a href="{{ get_taxonomy_url(kind='tags', name=tag.name) }}">
<span style="font-size: 1.{{ tag.pages | length - 1 }}rem">{{ tag.name }}<sup>{{ tag.pages | length }}</sup></span>
{% set size=tag.pages | length %}
<span style="font-size: {{ 1 + (size - 1) / 10 }}rem">{{ tag.name }}<sup>{{ size }}</sup></span>
</a> ·
{% endfor %}
</section>