From f576d237d759d1855325587488a9630dd18fc713 Mon Sep 17 00:00:00 2001 From: Devin Haska Date: Fri, 9 Feb 2024 22:36:14 -0800 Subject: [PATCH] feat: add catalogue page for individual items --- src/_layouts/catalogue.html | 16 ++++++++++++++++ src/assets/css/blocks/catalogue.css | 3 +++ src/content/catalogue/books/books.json | 2 +- src/content/catalogue/games/games.json | 5 +++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/_layouts/catalogue.html create mode 100644 src/assets/css/blocks/catalogue.css diff --git a/src/_layouts/catalogue.html b/src/_layouts/catalogue.html new file mode 100644 index 0000000..6b203d1 --- /dev/null +++ b/src/_layouts/catalogue.html @@ -0,0 +1,16 @@ +--- +layout: base +--- + +
+
+
+

{{ title }}

+

{{ subtitle }}

+
+ {% if image %} +
{% image image, "", "" %}
+ {% endif %} +
+ {{ content | safe }} +
diff --git a/src/assets/css/blocks/catalogue.css b/src/assets/css/blocks/catalogue.css new file mode 100644 index 0000000..05fcd30 --- /dev/null +++ b/src/assets/css/blocks/catalogue.css @@ -0,0 +1,3 @@ +.catalogue .meta img { + inline-size: 10rem; +} diff --git a/src/content/catalogue/books/books.json b/src/content/catalogue/books/books.json index f955713..37fb026 100644 --- a/src/content/catalogue/books/books.json +++ b/src/content/catalogue/books/books.json @@ -1,5 +1,5 @@ { - "layout": "base", + "layout": "catalogue", "tags": "books", "permalink": "books/{{ page.fileSlug }}/index.html" } diff --git a/src/content/catalogue/games/games.json b/src/content/catalogue/games/games.json index e69de29..7a121dc 100644 --- a/src/content/catalogue/games/games.json +++ b/src/content/catalogue/games/games.json @@ -0,0 +1,5 @@ +{ + "layout": "catalogue", + "tags": "games", + "permalink": "games/{{ page.fileSlug }}/index.html" +}