diff --git a/src/_includes/macros/catalogue.njk b/src/_includes/macros/catalogue.njk index 92c26c4..69ba1d5 100644 --- a/src/_includes/macros/catalogue.njk +++ b/src/_includes/macros/catalogue.njk @@ -1,36 +1,26 @@ {% from "macros/utils.njk" import stars %} - {% macro one(post, format, showType = true) %} -
-
{{ post.data.title }} - {% if showType %}

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

{% endif %}
-
- {% if post.data.rating %} - {{ stars(post.data.rating) }} - {% endif %} -
-
+
+
+ {{ post.data.title }} + {% if showType %}

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

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

{{ year }}

-

- {{ posts | length }} -

-
- {{ list(posts, format) }} -
+
+
+

{{ year }}

+

{{ posts | length }}

+
+ {{ list(posts, format) }} +
{% endmacro %} - diff --git a/src/_includes/macros/posts.njk b/src/_includes/macros/posts.njk index b520635..434c18b 100644 --- a/src/_includes/macros/posts.njk +++ b/src/_includes/macros/posts.njk @@ -1,29 +1,21 @@ {% macro one(post, format = "MM/DD") %} -
- {{ post.data.title }} - -

{{ post.data.excerpt }}

-
+
+ {{ post.data.title }} + +

{{ post.data.excerpt }}

+
{% endmacro %} - {% macro list(posts, format = "MM/DD") %} -
    - {% for post in posts %} -
  1. - {{ one(post, format) }} -
  2. - {% endfor %} -
+
    + {% for post in posts %}
  1. {{ one(post, format) }}
  2. {% endfor %} +
{% endmacro %} - {% macro yearList(posts, year, format = "MM/DD") %} -
-
-

{{ year }}

-

- {{ posts | length }} -

-
- {{ list(posts, format) }} -
+
+
+

{{ year }}

+

{{ posts | length }}

+
+ {{ list(posts, format) }} +
{% endmacro %} diff --git a/src/_includes/partials/catalogue-types.html b/src/_includes/partials/catalogue-types.html index bafa833..d59ade1 100644 --- a/src/_includes/partials/catalogue-types.html +++ b/src/_includes/partials/catalogue-types.html @@ -1,11 +1,11 @@ {% set catalogueTypes = collections.catalogueByType | keys %} diff --git a/src/css/blocks/button.css b/src/css/blocks/button.css index 54ce617..697b47a 100644 --- a/src/css/blocks/button.css +++ b/src/css/blocks/button.css @@ -88,3 +88,15 @@ } } } + +.button__count { + color: var(--color-fadeText); +} + +@media (hover: hover) { + .button:hover { + .button__count { + color: var(--color-border); + } + } +} diff --git a/src/css/blocks/pill.css b/src/css/blocks/pill.css index 3ae09ed..b88d38e 100644 --- a/src/css/blocks/pill.css +++ b/src/css/blocks/pill.css @@ -1,82 +1,11 @@ .pill { display: inline-flex; align-items: center; - padding-inline: var(--spacing-1); - padding-block: var(--spacing-0\.5); - gap: var(--spacing-0\.5); - position: relative; - - transition: transform 0.1s ease; - - &::before, - &::after { - position: absolute; - inset: 0; - content: ""; - z-index: -1; - border-radius: var(--spacing-1); - - transition: opacity 0.3s ease; - } - - &::before { - background-color: var(--color-surface); - } - - &::after { - background-color: var(--color-text); - opacity: 0; - } -} - -.pill[data-state="small"] { + background-color: var(--color-surface); color: var(--color-fadeText); 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); -} - -.pill[data-state="extrasmall"] { - color: var(--color-fadeText); - padding-inline: var(--spacing-0\.5); - padding-block: var(--spacing-0\.25); - font-size: 0.8rem; - line-height: 0.8rem; border-radius: var(--spacing-0\.5); } - -button.pill:hover, -a[href].pill:hover { - color: var(--color-primary); - transform: translateY(-2px); - - &::before { - opacity: 0; - } - - &::after { - opacity: 1; - } -} - -button.pill:active, -a[href].pill:active { - transform: translateY(2px); -} - -a.pill { - text-decoration: none; -} - -.pill-count { - color: var(--color-fadeText); -} - -button.pill:hover, -a[href].pill:hover { - .pill-count { - color: var(--color-border); - } -} diff --git a/src/pages/catalogue-type.html b/src/pages/catalogue-type.html index 968c4b3..5051722 100644 --- a/src/pages/catalogue-type.html +++ b/src/pages/catalogue-type.html @@ -13,7 +13,7 @@ eleventyComputed: --- {% from "macros/catalogue.njk" import yearList %} -

Catalogue: {{ type | pluralize | capitalize }}

+

{{ type | pluralize | capitalize }}

{% include "partials/catalogue-types.html" %} {% set itemsByYear = collections.catalogueByType[type] | reverse | organizeByDate %} {% set years = itemsByYear | keys | sort("desc") %} diff --git a/src/pages/styleguide.html b/src/pages/styleguide.html index ada30de..aa3650b 100644 --- a/src/pages/styleguide.html +++ b/src/pages/styleguide.html @@ -34,19 +34,13 @@ description: A demo of the site's theme.

-
+
A button + A button with count 4
- A pill - - A pill link with a count 3 - -

- A pill with a count 3 -

-

A small pill

-

99+

+

A pill

+

99+


A link diff --git a/src/pages/tags.html b/src/pages/tags.html index 9be2f9e..a858f24 100644 --- a/src/pages/tags.html +++ b/src/pages/tags.html @@ -9,7 +9,7 @@ description: Browse posts by all tags.
    {% for tag in tags %}
  1. - {{ tag.tag }} {{ tag.count }} + {{ tag.tag }} {{ tag.count }}
  2. {% endfor %}