refactor: modify file structure to improve customizability

This commit is contained in:
st1020 2024-01-20 17:58:08 +08:00
parent 9b2e5a305c
commit 67b58641e5
16 changed files with 156 additions and 157 deletions

View file

@ -0,0 +1,20 @@
{% if page.taxonomies %}
<footer class="mt-12 flex flex-col">
{% set_global term_names = [] %}<!---->
{% for term_name, terms in page.taxonomies %}<!---->
{% set_global term_names = term_names | concat(with=term_name) %}<!---->
{% endfor %}<!---->
{% for term_name in term_names | sort %}
<div class="mb-2 flex flex-wrap">
<span class="block-bg mb-1.5 mr-1.5 rounded-lg px-5 py-1.5">{{ term_name | title }} </span>
{% for term in page.taxonomies[term_name] %}
<a
class="block-bg block-hover mb-1.5 mr-1.5 rounded-lg px-5 py-1.5 no-underline"
href="{{ get_taxonomy_url(kind=term_name, name=term) | safe }}"
>{{ term }}</a
>
{% endfor %}
</div>
{% endfor %}
</footer>
{% endif %}