diff --git a/src/_includes/css/spacing.njk b/src/_includes/css/spacing.njk index 3c4b30e..c4bb800 100644 --- a/src/_includes/css/spacing.njk +++ b/src/_includes/css/spacing.njk @@ -4,6 +4,14 @@ gap: {{ value }}px; } + .row-gap-{{ key }} { + row-gap: {{ value }}px; + } + + .column-gap-{{ key }} { + column-gap: {{ value }}px; + } + .p-{{ key }} { padding: {{ value }}px; } @@ -72,6 +80,10 @@ width: {{ value }}px; height: {{ value }}px; } + + .radius-{{ key }} { + border-radius: {{ value }}px; + } {% endfor %} :root { diff --git a/src/_layouts/book.html b/src/_layouts/book.html new file mode 100644 index 0000000..eafe4fc --- /dev/null +++ b/src/_layouts/book.html @@ -0,0 +1,37 @@ +--- +layout: base +--- + +
+ +
+
+

{{ title }}

+ {% if subtitle %}

{{ subtitle }}

{% endif %} +
+
+
+ Author +
+
{{ author }}
+
+ ISBN +
+
{{ isbn }}
+
+
+
    + {% for tag in tags | filter(["catalogue", "book"]) %} +
  • {{ tag }}
  • + {% endfor %} +
+
+ {% if image %} +
{% image image, "", "" %}
+ {% endif %} +
+ {{ content | safe }} +
diff --git a/src/_layouts/catalogue.html b/src/_layouts/catalogue.html index 11c3b1b..e235a7a 100644 --- a/src/_layouts/catalogue.html +++ b/src/_layouts/catalogue.html @@ -6,7 +6,7 @@ layout: base

{{ title }}

-

{{ subtitle }}

+

{{ subtitle }}

{% if image %}
{% image image, "", "" %}
diff --git a/src/assets/css/blocks/catalogue.css b/src/assets/css/blocks/catalogue.css index 65463eb..c78e18c 100644 --- a/src/assets/css/blocks/catalogue.css +++ b/src/assets/css/blocks/catalogue.css @@ -1,4 +1,4 @@ -.catalogue .meta img { +.catalogue .meta picture { inline-size: 10rem; } @@ -6,3 +6,9 @@ font-size: 0.8rem; border-radius: 0.5rem; } + +.catalogue-meta { + display: grid; + grid-template-columns: auto 1fr; + font-size: 0.875rem; +} diff --git a/src/content/catalogue/books/books.json b/src/content/catalogue/books/books.json index 5f32a2e..ffea3d2 100644 --- a/src/content/catalogue/books/books.json +++ b/src/content/catalogue/books/books.json @@ -1,5 +1,5 @@ { - "layout": "catalogue", + "layout": "book", "tags": "book", "permalink": "catalogue/books/{{ page.fileSlug }}/index.html" }