From ab9618665ef5633febe9bd476b79a2a69bbb62b1 Mon Sep 17 00:00:00 2001 From: taco Date: Fri, 10 Apr 2026 19:20:08 -0400 Subject: [PATCH] feat(breadcrumbs): add to posts and other pages --- _includes/_og.njk | 22 +++++++++++ _includes/base.njk | 5 ++- _includes/main.njk | 11 ++++++ _includes/post-list.njk | 26 ++++++++----- _includes/post.njk | 53 +++++++++++++++++++++------ about/index.md | 3 +- assets/css/colors.css | 3 +- assets/css/layout.css | 24 ++++++++++++ index.md | 2 +- posts/moving-on-from-freenom/index.md | 1 + 10 files changed, 122 insertions(+), 28 deletions(-) create mode 100644 _includes/_og.njk create mode 100644 _includes/main.njk diff --git a/_includes/_og.njk b/_includes/_og.njk new file mode 100644 index 0000000..b407f36 --- /dev/null +++ b/_includes/_og.njk @@ -0,0 +1,22 @@ +{% if tags == "post" %} + + + + + {% for tag in keywords %} + + {% endfor %} + + + + + +{% else %} + + + + + + + +{% endif %} diff --git a/_includes/base.njk b/_includes/base.njk index 9d0ea7c..bfb8c1a 100644 --- a/_includes/base.njk +++ b/_includes/base.njk @@ -1,14 +1,15 @@ - + + {% include "_og.njk" %} {{ title }} - mestizo.monster {% include "_header.njk" %} -
{{ content | safe }}
+ {{ content | safe }} {% include "_footer.njk" %} diff --git a/_includes/main.njk b/_includes/main.njk new file mode 100644 index 0000000..3aefecd --- /dev/null +++ b/_includes/main.njk @@ -0,0 +1,11 @@ +--- +layout: base.njk +--- + +{% if title != "home" %} +
+ +
+{% endif %} + +
{{ content | safe }}
diff --git a/_includes/post-list.njk b/_includes/post-list.njk index 581f5c4..751e507 100644 --- a/_includes/post-list.njk +++ b/_includes/post-list.njk @@ -2,13 +2,19 @@ layout: base.njk --- -{{ content | safe }} - +
+ +
+ +
+ {{ content | safe }} + +
diff --git a/_includes/post.njk b/_includes/post.njk index f25170e..0f8b733 100644 --- a/_includes/post.njk +++ b/_includes/post.njk @@ -2,15 +2,44 @@ layout: base.njk --- -
-
-

{{ title }}

-

{{ description }}

- -
-
{{ content | safe }}
-
+{% set previousPost = collections.post | getPreviousCollectionItem %} +{% set nextPost = collections.post | getNextCollectionItem %} + +
+ +
+ +
+
+
+

{{ title }}

+

{{ description }}

+ +
+
{{ content | safe }}
+ +
+
diff --git a/about/index.md b/about/index.md index ed988bb..444bb5c 100644 --- a/about/index.md +++ b/about/index.md @@ -1,7 +1,6 @@ --- title: "about" -layout: base.njk -images: ["about/taco.png"] +layout: main.njk description: "but who is taco? and how much does it weigh?" --- diff --git a/assets/css/colors.css b/assets/css/colors.css index 96cd624..6758acf 100644 --- a/assets/css/colors.css +++ b/assets/css/colors.css @@ -64,6 +64,7 @@ a:visited { nav { background-color: var(--color-dark-brown); + color: var(--color-gray); } h1, @@ -90,7 +91,7 @@ a:visited { footer { p { font-size: 1.1em; - color: var(--color-dark-purple); + color: var(--color-gray); } } } diff --git a/assets/css/layout.css b/assets/css/layout.css index 2e9a501..29a25f3 100644 --- a/assets/css/layout.css +++ b/assets/css/layout.css @@ -66,6 +66,14 @@ article { } } +section { + nav { + margin-top: 1em; + padding: 1em; + border-radius: 0.42em; + } +} + article { padding: 0.5em; hgroup { @@ -75,7 +83,23 @@ article { text-align: justify; } } + nav { + ol { + list-style: none; + padding: 0; + margin: 0; + display: flex; + justify-content: space-between; + li:first-of-type { + text-align: left; + } + li:last-of-type { + text-align: right; + } + } + } } + blockquote { margin: 1em; padding: 1em; diff --git a/index.md b/index.md index 1b22fe3..7256f34 100644 --- a/index.md +++ b/index.md @@ -1,6 +1,6 @@ --- title: "home" -layout: base.njk +layout: main.njk description: "words by taco, the mestizo monster." --- diff --git a/posts/moving-on-from-freenom/index.md b/posts/moving-on-from-freenom/index.md index b1e4d79..1962264 100644 --- a/posts/moving-on-from-freenom/index.md +++ b/posts/moving-on-from-freenom/index.md @@ -22,6 +22,7 @@ keywords: "life", "technology", ] +section: technology images: ["posts/moving-on-from-freenom/header.png"] description: "what's the harm in a free domain name?" aliases: ["../2023/10/06/moving-on-from-freenom/"]