feat: various style improvements to catalogue

This commit is contained in:
Devin Haska 2024-02-17 18:10:32 -08:00
parent fbf6bb2976
commit 1ffc6d1ede
13 changed files with 77 additions and 17 deletions

View file

@ -1,5 +1,5 @@
{
"layout": "catalogue",
"tags": "book",
"permalink": "books/{{ page.fileSlug }}/index.html"
"permalink": "catalogue/books/{{ page.fileSlug }}/index.html"
}

View file

@ -0,0 +1,26 @@
---
layout: base
pagination:
data: collections.catalogueByType
size: 1
alias: type
filter:
- catalogue
eleventyExcludeFromCollections: true
permalink: /catalogue/{{ type | pluralize | slugify }}/index.html
eleventyComputed:
title: Catalogue - {{ type | pluralize | capitalize }}
---
<h1>{{ type | pluralize | capitalize }}</h1>
{% set catalogueTypes = collections.catalogueByType | keys %}
<ul class="[ flex list-none gap-0.5 p-0 ]">
{% for type in catalogueTypes %}
<li>
<a class="[ pill ] [ flex px-1 py-0.5 gap-0.5 ]"
href="/catalogue/{{ type | pluralize }}">{{ type | pluralize }}<span class="[ pill-count ]">{{ collections.catalogueByType[ type ] | length }}</span></a>
</li>
{% endfor %}
</ul>
{% set items = collections.catalogueByType[ type ] %}
{% include "partials/catalogue.html" %}

View file

@ -1,5 +1,5 @@
{
"layout": "catalogue",
"tags": "comic",
"permalink": "comics/{{ page.fileSlug }}/index.html"
"permalink": "catalogue/comics/{{ page.fileSlug }}/index.html"
}

View file

@ -1,5 +1,5 @@
{
"layout": "catalogue",
"tags": "game",
"permalink": "games/{{ page.fileSlug }}/index.html"
"permalink": "catalogue/games/{{ page.fileSlug }}/index.html"
}

View file

@ -1,5 +1,5 @@
{
"layout": "catalogue",
"tags": "podcast",
"permalink": "podcasts/{{ page.fileSlug }}/index.html"
"permalink": "catalogue/podcasts/{{ page.fileSlug }}/index.html"
}

View file

@ -6,4 +6,13 @@ title: Catalogue
<h1>Catalogue</h1>
{% set items = collections.catalogue | reverse %}
{% set catalogueTypes = collections.catalogueByType | keys %}
<ul class="[ flex list-none gap-0.5 p-0 ]">
{% for type in catalogueTypes %}
<li>
<a class="[ pill ] [ flex px-1 py-0.5 gap-0.5 ]"
href="/catalogue/{{ type | pluralize }}">{{ type | pluralize }}<span class="[ pill-count ]">{{ collections.catalogueByType[ type ] | length }}</span></a>
</li>
{% endfor %}
</ul>
{% include "partials/catalogue.html" %}