From b5fd748a55660870b5f399255a97f778fb475ded Mon Sep 17 00:00:00 2001 From: Devin Haska Date: Fri, 1 Mar 2024 15:48:42 -0800 Subject: [PATCH] feat: update catalogue list --- src/_includes/macros/catalogue.njk | 15 +++++++-------- src/_includes/partials/catalogue-types.html | 3 +++ src/_includes/partials/menu.html | 2 +- src/catalogue-type.html | 2 +- src/css/blocks/pill.css | 1 + 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/_includes/macros/catalogue.njk b/src/_includes/macros/catalogue.njk index 1c0f554..92c26c4 100644 --- a/src/_includes/macros/catalogue.njk +++ b/src/_includes/macros/catalogue.njk @@ -1,11 +1,10 @@ {% from "macros/utils.njk" import stars %} -{% macro one(post, format) %} +{% macro one(post, format, showType = true) %}
- {{ post.data.title }} - -
-

{{ post.data.tags[1] }}

+
{{ post.data.title }} + {% if showType %}

{{ post.data.tags[1] }}

{% endif %}
+
{% if post.data.rating %} {{ stars(post.data.rating) }} {% endif %} @@ -13,17 +12,17 @@
{% endmacro %} -{% macro list(posts) %} +{% macro list(posts, showType = true) %}
    {% for post in posts %}
  1. - {{ one(post, format) }} + {{ one(post, format, showType) }}
  2. {% endfor %}
{% endmacro %} -{% macro yearList(posts, year, format = "MM/DD") %} +{% macro yearList(posts, year, format = "MM/DD", showType = true) %}

{{ year }}

diff --git a/src/_includes/partials/catalogue-types.html b/src/_includes/partials/catalogue-types.html index 8c1906d..bafa833 100644 --- a/src/_includes/partials/catalogue-types.html +++ b/src/_includes/partials/catalogue-types.html @@ -1,5 +1,8 @@ {% set catalogueTypes = collections.catalogueByType | keys %}
    +
  • + all{{ collections.catalogue | length }} +
  • {% for type in catalogueTypes %}
  • {{ type | pluralize }}{{ collections.catalogueByType[ type ] | length }} diff --git a/src/_includes/partials/menu.html b/src/_includes/partials/menu.html index 4d6417e..60e3804 100644 --- a/src/_includes/partials/menu.html +++ b/src/_includes/partials/menu.html @@ -1,7 +1,7 @@ diff --git a/src/catalogue-type.html b/src/catalogue-type.html index c23fe86..08c6f5f 100644 --- a/src/catalogue-type.html +++ b/src/catalogue-type.html @@ -20,6 +20,6 @@ eleventyComputed:
    {% for year in years %} {% set itemsInYear = itemsByYear[year] %} - {{ yearList(itemsInYear, year) }} + {{ yearList(itemsInYear, year, false) }} {% endfor %}
    diff --git a/src/css/blocks/pill.css b/src/css/blocks/pill.css index 9fc46ef..2de8ada 100644 --- a/src/css/blocks/pill.css +++ b/src/css/blocks/pill.css @@ -15,6 +15,7 @@ font-size: 0.8rem; line-height: 0.8rem; padding-inline: var(--spacing-0\.5); + padding-block: var(--spacing-0\.25); border-radius: var(--spacing-0\.25); }