feat(tags): dynamically adjust tag list columns based on tag count (#233)

This commit is contained in:
Óscar Fernández 2023-12-30 17:42:26 +01:00 committed by GitHub
parent d257e022ea
commit 9fc45f288d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 3 deletions

View file

@ -6,7 +6,8 @@
{{ macros_page_header::page_header(title=title)}}
<div class="tag-cloud">
{% set tag_count = terms | length %}
<div id="tag-cloud" class="{% if tag_count > 16 %}three-columns{% elif tag_count > 8 %}two-columns{% endif %}">
<ul class="tags">
{%- for term in terms -%}
<li class="tags-item">