fix: update tag lists to use cluster layout

This commit is contained in:
Devin Haska 2024-02-22 10:07:35 -08:00
parent bab76c7f31
commit 0b9253fb02
7 changed files with 6 additions and 10 deletions

View file

@ -1,6 +1,6 @@
{% macro list(tags) %}
{% macro pills(tags) %}
{% if tags | length > 0 %}
<ul class="[ flex list-none p-0 gap-0.5 mb-0 ]">
<ul class="[ cluster list-none p-0 mb-0 ]" style="--gap: 0.5rem">
{% for tag in tags %}<li class="[ bg-surface radius-1 px-1 py-0.5 ]">{{ tag }}</li>{% endfor %}
</ul>
{% endif %}

View file

@ -17,8 +17,6 @@ layout: base
<span class="[ text-fadeText ]">by</span> {{ author }}
</p>
{% endif %}
{% import "macros/tags.njk" as tags %}
{{ tags.list(filteredTags) }}
</section>
<hr class="[ my-3 ]" />
{{ content | safe }}

View file

@ -12,8 +12,6 @@ layout: base
{% endif %}
<h1>{{ title }}</h1>
<h2 class="[ text-fadeText my-0.5 ]">{{ year }}</h2>
{% import "macros/tags.njk" as tags %}
{{ tags.list(filteredTags) }}
</section>
<hr class="[ my-3 ]" />
{{ content | safe }}

View file

@ -7,7 +7,7 @@ layout: base
{% from "macros/date.njk" import format %}
{{ format(date) }}
<h1>{{ title }}</h1>
<ul class="[ categories ] [ flex gap-1 list-none p-0 ]">
<ul class="[ categories ] [ cluster list-none p-0 ]">
{% for tag in tags | filter(["post"]) %}
<li>
<a class="[ flex ]" href="/tags/{{ tag | slugify }}">{{ tag }}</a>

View file

@ -14,7 +14,7 @@ eleventyComputed:
<h1>{{ type | pluralize | capitalize }}</h1>
{% set catalogueTypes = collections.catalogueByType | keys %}
<ul class="[ flex list-none gap-0.5 p-0 ]">
<ul class="[ cluster list-none p-0 ]" style="--gap: var(--spacing-0\.5)">
{% for type in catalogueTypes %}
<li>
<a class="[ pill ] [ flex px-1 py-0.5 gap-0.5 ]"

View file

@ -8,7 +8,7 @@ title: Catalogue
<p>A collection of my thoughts on various forms of media that I consume.</p>
{% set items = collections.catalogue %}
{% set catalogueTypes = collections.catalogueByType | keys %}
<ul class="[ flex list-none gap-0.5 p-0 ]">
<ul class="[ cluster list-none p-0 ]" style="--gap: 0.5rem">
{% for type in catalogueTypes %}
<li>
<a class="[ pill ] [ flex px-1 py-0.5 gap-0.5 ]"

View file

@ -7,7 +7,7 @@ title: All tags
{% set tags = collections.post | allTagCounts %}
<section class="[ flow ]">
<h1>{{ title }}</h1>
<ol class="[ flex flex-wrap gap-0.5 list-none p-0 mb-0 ]">
<ol class="[ cluster list-none p-0 ]" style="--gap: var(--spacing-0\.5)">
{% for tag in tags %}
<li>
<a href="/tags/{{ tag.tag | slugify }}"