From 850173ec90fb881c09c62a967a5efd9b592f0ac5 Mon Sep 17 00:00:00 2001 From: Devin Haska Date: Wed, 28 Feb 2024 10:32:37 -0800 Subject: [PATCH] feat: various markup improvements --- src/_includes/layouts/catalogue-item.html | 16 +++++------- src/_includes/layouts/post.html | 2 +- src/_includes/macros/catalogue.njk | 8 +++--- src/_includes/macros/posts.njk | 6 ++--- src/_includes/macros/tags.njk | 7 ----- src/_includes/partials/catalogue-types.html | 8 ++++++ src/_includes/partials/footer.html | 9 +++---- src/catalogue-type.html | 12 ++------- src/catalogue.html | 10 +------ src/catalogue/books/books.11tydata.js | 2 +- src/css/blocks/pill.css | 29 ++++++++++++++++++--- src/tags.html | 5 ++-- 12 files changed, 58 insertions(+), 56 deletions(-) delete mode 100644 src/_includes/macros/tags.njk create mode 100644 src/_includes/partials/catalogue-types.html diff --git a/src/_includes/layouts/catalogue-item.html b/src/_includes/layouts/catalogue-item.html index e5ba9a4..4683c7c 100644 --- a/src/_includes/layouts/catalogue-item.html +++ b/src/_includes/layouts/catalogue-item.html @@ -6,16 +6,14 @@ imageCaption: "" {% set filteredTags = tags | filterCatalogueTags %}
-
- {% block image %} - {% if image %} - {% image image, imageAlt, imageCaption %} - {% endif %} - {% endblock %} -
+ {% block image %} + {% if image %} + {% image image, imageAlt, imageCaption %} + {% endif %} + {% endblock %}
{% block title %}

{{ title }}

{% endblock %} - {% if subtitle %}

{{ subtitle }}

{% endif %} + {% if subtitle %}

{{ subtitle }}

{% endif %} {{ tertiary | safe }} {% if rating %}
@@ -24,7 +22,7 @@ imageCaption: ""
{% endif %} {% if filteredTags | length > 0 %} -
    +
      {% for tag in filteredTags %}
    • {{ tag }}
    • {% endfor %}
    {% endif %} diff --git a/src/_includes/layouts/post.html b/src/_includes/layouts/post.html index b14dc66..78ea8ec 100644 --- a/src/_includes/layouts/post.html +++ b/src/_includes/layouts/post.html @@ -3,7 +3,7 @@ layout: "layouts/base" ---
    -
    +
    {% from "macros/date.njk" import format %} {{ format(page.date) }}

    {{ title }}

    diff --git a/src/_includes/macros/catalogue.njk b/src/_includes/macros/catalogue.njk index c7e405f..1c0f554 100644 --- a/src/_includes/macros/catalogue.njk +++ b/src/_includes/macros/catalogue.njk @@ -3,9 +3,9 @@ {% macro one(post, format) %}
    {{ post.data.title }} -

    {{ post.date | formatDate("MM/DD") }}

    +
    -

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

    +

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

    {% if post.data.rating %} {{ stars(post.data.rating) }} {% endif %} @@ -14,7 +14,7 @@ {% endmacro %} {% macro list(posts) %} -
      +
        {% for post in posts %}
      1. {{ one(post, format) }} @@ -27,7 +27,7 @@

        {{ year }}

        -

        +

        {{ posts | length }}

        diff --git a/src/_includes/macros/posts.njk b/src/_includes/macros/posts.njk index 6e411e4..b520635 100644 --- a/src/_includes/macros/posts.njk +++ b/src/_includes/macros/posts.njk @@ -1,13 +1,13 @@ {% macro one(post, format = "MM/DD") %}
        {{ post.data.title }} -

        {{ post.date | formatDate(format) }}

        +

        {{ post.data.excerpt }}

        {% endmacro %} {% macro list(posts, format = "MM/DD") %} -
          +
            {% for post in posts %}
          1. {{ one(post, format) }} @@ -20,7 +20,7 @@

            {{ year }}

            -

            +

            {{ posts | length }}

            diff --git a/src/_includes/macros/tags.njk b/src/_includes/macros/tags.njk deleted file mode 100644 index 4aa16eb..0000000 --- a/src/_includes/macros/tags.njk +++ /dev/null @@ -1,7 +0,0 @@ -{% macro pills(tags) %} - {% if tags | length > 0 %} -
              - {% for tag in tags %}
            • {{ tag }}
            • {% endfor %} -
            - {% endif %} -{% endmacro %} diff --git a/src/_includes/partials/catalogue-types.html b/src/_includes/partials/catalogue-types.html new file mode 100644 index 0000000..8c1906d --- /dev/null +++ b/src/_includes/partials/catalogue-types.html @@ -0,0 +1,8 @@ +{% set catalogueTypes = collections.catalogueByType | keys %} + diff --git a/src/_includes/partials/footer.html b/src/_includes/partials/footer.html index ed03e91..ca547fe 100644 --- a/src/_includes/partials/footer.html +++ b/src/_includes/partials/footer.html @@ -3,7 +3,7 @@

            © {{ meta.author }} 2018-2024.

            -