From 57cc65e31e1ebc73ecb687d859b590ef30b45e3c Mon Sep 17 00:00:00 2001 From: Nathan Upchurch Date: Wed, 7 Jan 2026 13:57:51 -0600 Subject: [PATCH] Implement status function --- _data/metadata.js | 5 +++ _includes/statusList.njk | 36 +++++++++++++++++++ content/changelog/index.md | 2 ++ content/prior-thoughts/index.njk | 26 ++++++++++++++ content/sitemap/index.md | 2 ++ content/status/index.njk | 42 ++++++++++++++++++++++ content/status/status.11tydata.js | 6 ++++ content/status/test.md | 5 +++ eleventy.config.js | 9 +++++ public/css/index.css | 29 +++++++++++++++ public/img/icons/breeze/clock-symbolic.svg | 42 ++++++++++++++++++++++ 11 files changed, 204 insertions(+) create mode 100644 _includes/statusList.njk create mode 100644 content/prior-thoughts/index.njk create mode 100644 content/status/index.njk create mode 100644 content/status/status.11tydata.js create mode 100644 content/status/test.md create mode 100644 public/img/icons/breeze/clock-symbolic.svg diff --git a/_data/metadata.js b/_data/metadata.js index a90108b..8b42779 100644 --- a/_data/metadata.js +++ b/_data/metadata.js @@ -71,6 +71,11 @@ export default { linkDisplay: "Sitemap", linkURL: "/sitemap/", }, + { + iconURL: "/img/icons/breeze/clock-symbolic.svg", + linkDisplay: "Status", + linkURL: "/status/", + }, { iconURL: "/img/icons/breeze/tag.svg", linkDisplay: "Topics", diff --git a/_includes/statusList.njk b/_includes/statusList.njk new file mode 100644 index 0000000..7ecbbf1 --- /dev/null +++ b/_includes/statusList.njk @@ -0,0 +1,36 @@ +
+ {% if postlistHeaderText %}

{{ postlistHeaderText }}

{% endif %} +
+ {% for status in postslist %} + + {% endfor %} +
+
diff --git a/content/changelog/index.md b/content/changelog/index.md index bf27694..41fed3b 100644 --- a/content/changelog/index.md +++ b/content/changelog/index.md @@ -4,6 +4,8 @@ title: Nathan Upchurch | Changelog structuredData: none --- # Changelog +* 2026-01-07 + * Added [status](/status) function. * 2026-01-01 * Added [/slashes](/slashes). * Updated [/sitemap](/sitemap). diff --git a/content/prior-thoughts/index.njk b/content/prior-thoughts/index.njk new file mode 100644 index 0000000..a1cdbea --- /dev/null +++ b/content/prior-thoughts/index.njk @@ -0,0 +1,26 @@ +--- +layout: layouts/base.njk +title: "Nathan Upchurch | Prior Thoughts" +pagination: + data: collections.priorThoughts + generatePageOnEmptyData: true + size: 20 +permalink: "prior-thoughts/{% if pagination.pageNumber > 0 %}page-{{ pagination.pageNumber + 1 }}/{% endif %}index.html" +paginationRootDir: prior-thoughts +--- +

Prior thoughts:

+ +{% set postsCount = pagination.items | length %} +{% if postsCount > 0 %} +{% set postslist = pagination.items %} +{% set showPostListHeader = false %} +{% include "statusList.njk" %} +{% else %} +

Nothing’s here yet!

+{% endif %} + +{% include "permalinkButtons.njk" %} + + + + diff --git a/content/sitemap/index.md b/content/sitemap/index.md index 79b4af5..1a3ee73 100644 --- a/content/sitemap/index.md +++ b/content/sitemap/index.md @@ -24,9 +24,11 @@ structuredData: none * [Now](/now) * [Now Burning](/now-burning) * [Once Burned](/once-burned) +* [Prior Thoughts](/prior-thoughts) * [Referrals](/referrals) * [Slashes](/slashes) * Special * [Flying Toasters](/special/flying-toasters) +* [Status](/status) * [Wishes](/wish) * [Quizzes](/quizzes) diff --git a/content/status/index.njk b/content/status/index.njk new file mode 100644 index 0000000..a105224 --- /dev/null +++ b/content/status/index.njk @@ -0,0 +1,42 @@ +--- +eleventyExcludeFromCollections: true +layout: layouts/base.njk +title: "Nathan Upchurch | Status: What I'm thinking at the moment." +structuredData: none +permalink: "/status/index.html" +--- +{% set status = collections.status | last %} + +

Nathan’s status:

+
+
+ {{ status.data.emoji }} + +
+

+ + + {{ status.data.comment }}
+ + +

+
+
+
+ + + diff --git a/content/status/status.11tydata.js b/content/status/status.11tydata.js new file mode 100644 index 0000000..0eb9c77 --- /dev/null +++ b/content/status/status.11tydata.js @@ -0,0 +1,6 @@ +export default { + tags: ["status"], + layout: "layouts/base.njk", + permalink: false, + structuredData: "none", +}; diff --git a/content/status/test.md b/content/status/test.md new file mode 100644 index 0000000..643888e --- /dev/null +++ b/content/status/test.md @@ -0,0 +1,5 @@ +--- +date: 2026-01-07 12:23:00 +emoji: 🤔 +comment: "Can we not do world war three, please?" +--- diff --git a/eleventy.config.js b/eleventy.config.js index 384bdf7..818e843 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -76,6 +76,15 @@ export default async function (eleventyConfig) { return arr.slice(1, arr.length); }); + eleventyConfig.addCollection("priorThoughts", async (collectionApi) => { + const arr = [...collectionApi.getFilteredByTag("status")].sort( + function (a, b) { + return b.date - a.date; + }, + ); + return arr.slice(1, arr.length); + }); + // Transforms eleventyConfig.addTransform("prettier", function (content, outputPath) { if (outputPath && outputPath.endsWith(".html")) { diff --git a/public/css/index.css b/public/css/index.css index 227903c..850ef72 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -618,6 +618,11 @@ header .home-link { } } +.microblog-emoji { + font-size: var(--step-6); + margin-right: var(--space-s); +} + .microblog-icon { filter: var(--logo-filter); height: var(--space-4xl); @@ -639,6 +644,30 @@ header .home-link { } } +.microblog-status { + display: flex; + flex-flow: row nowrap; + &.card { + align-items: center; + padding: var(--space-s); + } + .microblog-status-copy { + align-items: center; + display: flex; + flex-flow: column nowrap; + p { + margin: 0; + } + .status-metadata { + font-family: var(--meta-font-family); + font-size: var(--meta-font-size); + font-style: var(--meta-font-style); + font-variation-settings: var(--meta-font-variation-settings); + line-height: calc(var(--meta-font-size) * 0.5 + var(--meta-font-size)); + } + } +} + /* Info Box */ .info { diff --git a/public/img/icons/breeze/clock-symbolic.svg b/public/img/icons/breeze/clock-symbolic.svg new file mode 100644 index 0000000..1029e31 --- /dev/null +++ b/public/img/icons/breeze/clock-symbolic.svg @@ -0,0 +1,42 @@ + +