feat: simplify layout structure

This commit is contained in:
Devin Haska 2024-02-22 14:10:12 -08:00
parent c2f112a41b
commit 7c38b2fa4b
36 changed files with 47 additions and 72 deletions

View file

@ -3,7 +3,6 @@ const dir = {
data: "_data",
includes: "_includes",
input: "src",
layouts: "_layouts",
output: "dist",
};

View file

@ -1,5 +1,5 @@
---
layout: base
layout: "layouts/base"
imageAlt: ""
imageCaption: ""
---
@ -27,4 +27,9 @@ imageCaption: ""
{% from "macros/date.njk" import format %}
{{ format(date) }}
{% block content %}{{ content | safe }}{% endblock %}
{% if url %}
<a href="{{ url }}" class="[ flex mt-1 items-center gap-0.5 ]" target="_blank" rel="external noreferrer noopener">
{% include "svgs/link.svg" %}{{ linkTitle }}
</a>
{% endif %}
</article>

View file

@ -1,5 +1,5 @@
---
layout: base
layout: "layouts/base"
pagination:
data: collections.catalogueByType
size: 1

View file

@ -1,5 +1,5 @@
---
layout: base
layout: "layouts/base"
permalink: /catalogue/index.html
title: Catalogue
---

View file

@ -1,5 +1,5 @@
---
layout: base
layout: "layouts/base"
---
<article class="[ flow ]">

View file

@ -1,5 +1,5 @@
---
layout: base
layout: "layouts/base"
pagination:
data: collections.postsByTag
size: 1

View file

@ -1,5 +1,5 @@
---
layout: base
layout: "layouts/base"
permalink: /tags/index.html
title: All tags
---

View file

@ -1,7 +0,0 @@
---
layout: "catalogue-item"
eleventyComputed:
tertiary: "<p> <span class=\"[ text-fadeText ]\">by</span> {{ author }}</p>"
---
{{ content | safe }}

View file

@ -1,7 +0,0 @@
---
layout: "catalogue-item"
eleventyComputed:
subtitle: "{{ author }} ({{ year }})"
---
{{ content | safe }}

View file

@ -1,7 +0,0 @@
---
layout: "catalogue-item"
eleventyComputed:
subtitle: "{{ year }}"
---
{{ content | safe }}

View file

@ -1,11 +0,0 @@
---
layout: "catalogue-item"
---
{{ content | safe }}
<a href="{{ url }}"
class="[ flex mt-1 items-center gap-0.5 ]"
target="_blank"
rel="external noreferrer noopener">
{% include "svgs/link.svg" %}
Listen to the podcast</a>

View file

@ -0,0 +1,6 @@
module.exports = {
layout: "layouts/catalogue-item",
tags: "book",
permalink: "catalogue/books/{{ page.fileSlug }}/index.html",
linkTitle: "View book details",
};

View file

@ -1,5 +0,0 @@
{
"layout": "book",
"tags": "book",
"permalink": "catalogue/books/{{ page.fileSlug }}/index.html"
}

View file

@ -1,5 +1,5 @@
{
"layout": "catalogue",
"layout": "layouts/catalogue",
"tags": "catalogue",
"permalink": "catalogue/index.html"
}

View file

@ -0,0 +1,8 @@
module.exports = {
layout: "layouts/catalogue-item",
tags: "game",
permalink: "catalogue/comics/{{ page.fileSlug }}/index.html",
eleventyComputed: {
subtitle: (data) => `${data.author} (${data.year})`,
},
};

View file

@ -1,5 +0,0 @@
{
"layout": "comic",
"tags": "comic",
"permalink": "catalogue/comics/{{ page.fileSlug }}/index.html"
}

View file

@ -7,6 +7,7 @@ year: 2017
image: https://cdn.wonderfulfrog.com/monstress-vol-1.jpeg
rating: 3
date: 2021-09-19T07:28:12.065Z
tags: ["fantasy"]
---
The first 75% of the volume is quite confusing. Its like reading the second or third volume in a series without reading the first. I get starting with a mystery as a hook, but when every second word is something new, I get confused!

View file

@ -8,6 +8,7 @@ image: https://cdn.wonderfulfrog.com/monstress-vol-2-tp_77ea1f170a.jpg
isbn: 9781534300415
rating: 3
date: 2021-09-20T00:22:01.235Z
tags: ["fantasy"]
---
I love the cast of the story. We are introduced to some new characters with a heavy nautical theme. Old Tooth the shark-person looks straight out of the 90s (remember Street Sharks?). The artwork continues to be the main selling point for me.

View file

@ -7,4 +7,5 @@ isbn: 9781459822290
rating: 4
image: https://cdn.wonderfulfrog.com/the-monster-sisters-vol-2.jpg
date: 2021-09-11
tags: ["adventure"]
---

View file

@ -0,0 +1,8 @@
module.exports = {
layout: "layouts/catalogue-item",
tags: "game",
permalink: "catalogue/games/{{ page.fileSlug }}/index.html",
eleventyComputed: {
subtitle: (data) => data.year,
},
};

View file

@ -1,5 +0,0 @@
{
"layout": "game",
"tags": "game",
"permalink": "catalogue/games/{{ page.fileSlug }}/index.html"
}

View file

@ -0,0 +1,6 @@
module.exports = {
layout: "layouts/catalogue-item",
tags: "podcast",
permalink: "catalogue/podcasts/{{ page.fileSlug }}/index.html",
linkTitle: "Listen to the podcast",
};

View file

@ -1,5 +0,0 @@
{
"layout": "podcast",
"tags": "podcast",
"permalink": "catalogue/podcasts/{{ page.fileSlug }}/index.html"
}

View file

@ -1,6 +1,4 @@
---
title: 404
layout: base
permalink: /404.html
youtube: true
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /about/index.html
title: About
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /blogroll/index.html
title: Blogroll
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /colophon/index.html
title: Colophon
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /links/index.html
title: Links
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /now/index.html
title: /now
---

View file

@ -0,0 +1,3 @@
{
"layout": "layouts/base"
}

View file

@ -1,6 +1,5 @@
---
permalink: /posts/index.html
layout: base
title: Posts
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /styleguide/index.html
title: Styleguide
---

View file

@ -1,5 +1,4 @@
---
layout: base
permalink: /uses/index.html
title: /uses
---

View file

@ -1,5 +1,5 @@
{
"layout": "post",
"layout": "layouts/post",
"tags": "post",
"permalink": "posts/{{ page.fileSlug }}/index.html"
}