Implement status function
This commit is contained in:
@@ -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",
|
||||
|
||||
36
_includes/statusList.njk
Normal file
36
_includes/statusList.njk
Normal file
@@ -0,0 +1,36 @@
|
||||
<section class="postlist microblog-list">
|
||||
{% if postlistHeaderText %}<h2>{{ postlistHeaderText }}</h2>{% endif %}
|
||||
<div class="postlist-item-container">
|
||||
{% for status in postslist %}
|
||||
<article class="post microblog-post">
|
||||
<div class="microblog-status card">
|
||||
<span class="microblog-emoji">{{ status.data.emoji }}</span>
|
||||
|
||||
<div class="microblog-status-copy">
|
||||
<p>
|
||||
<span class="status-metadata">
|
||||
{% if metadata.author.url %}
|
||||
<a href="{{ metadata.author.url }}">
|
||||
{% endif %}
|
||||
|
||||
{% if metadata.author.name %}
|
||||
{{ metadata.author.name }}
|
||||
{% endif %}
|
||||
|
||||
{% if metadata.author.url %}
|
||||
</a><br />
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
{{ status.data.comment }}<br />
|
||||
|
||||
<span class="status-metadata">
|
||||
{{ status.date | niceDate }}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
@@ -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).
|
||||
|
||||
26
content/prior-thoughts/index.njk
Normal file
26
content/prior-thoughts/index.njk
Normal file
@@ -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
|
||||
---
|
||||
<h1>Prior thoughts:</h1>
|
||||
|
||||
{% set postsCount = pagination.items | length %}
|
||||
{% if postsCount > 0 %}
|
||||
{% set postslist = pagination.items %}
|
||||
{% set showPostListHeader = false %}
|
||||
{% include "statusList.njk" %}
|
||||
{% else %}
|
||||
<p>Nothing’s here yet!</p>
|
||||
{% endif %}
|
||||
|
||||
{% include "permalinkButtons.njk" %}
|
||||
|
||||
<a href="/status/">
|
||||
<button type="button">Latest »</button>
|
||||
</a>
|
||||
@@ -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)
|
||||
|
||||
42
content/status/index.njk
Normal file
42
content/status/index.njk
Normal file
@@ -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 %}
|
||||
|
||||
<h1>Nathan’s status:</h1>
|
||||
<article class="post microblog-post">
|
||||
<div class="microblog-status card">
|
||||
<span class="microblog-emoji">{{ status.data.emoji }}</span>
|
||||
|
||||
<div class="microblog-status-copy">
|
||||
<p>
|
||||
<span class="status-metadata">
|
||||
{% if metadata.author.url %}
|
||||
<a href="{{ metadata.author.url }}">
|
||||
{% endif %}
|
||||
|
||||
{% if metadata.author.name %}
|
||||
{{ metadata.author.name }}
|
||||
{% endif %}
|
||||
|
||||
{% if metadata.author.url %}
|
||||
</a><br />
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
{{ status.data.comment }}<br />
|
||||
|
||||
<span class="status-metadata">
|
||||
{{ status.date | niceDate }}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<a href="/prior-thoughts/">
|
||||
<button type="button">Previous Entries »</button>
|
||||
</a>
|
||||
6
content/status/status.11tydata.js
Normal file
6
content/status/status.11tydata.js
Normal file
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
tags: ["status"],
|
||||
layout: "layouts/base.njk",
|
||||
permalink: false,
|
||||
structuredData: "none",
|
||||
};
|
||||
5
content/status/test.md
Normal file
5
content/status/test.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
date: 2026-01-07 12:23:00
|
||||
emoji: 🤔
|
||||
comment: "Can we not do world war three, please?"
|
||||
---
|
||||
@@ -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")) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
42
public/img/icons/breeze/clock-symbolic.svg
Normal file
42
public/img/icons/breeze/clock-symbolic.svg
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 22 22"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="clock-symbolic.svg"
|
||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="41.5"
|
||||
inkscape:cx="11"
|
||||
inkscape:cy="11"
|
||||
inkscape:window-width="2048"
|
||||
inkscape:window-height="1080"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg1" /><defs
|
||||
id="defs3051"><style
|
||||
type="text/css"
|
||||
id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style><style
|
||||
type="text/css"
|
||||
id="current-color-scheme-9">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style></defs><path
|
||||
style="display:inline;fill:#faf5f5;fill-opacity:1;stroke:none;stroke-width:1.33333"
|
||||
d="m 11,2.9999996 c -4.4182786,0 -7.9999999,3.5817218 -7.9999999,8.0000004 0,4.418277 3.5817213,8 7.9999999,8 4.418277,0 8,-3.581723 8,-8 0,-4.4182786 -3.581723,-8.0000004 -8,-8.0000004 z m 0,1.3333339 c 3.681899,0 6.666667,2.9847679 6.666667,6.6666665 0,3.681899 -2.984768,6.666667 -6.666667,6.666667 C 7.3181014,17.666667 4.3333334,14.681899 4.3333334,11 4.3333334,7.3181014 7.3181014,4.3333335 11,4.3333335 Z M 9.6666667,5.6666668 V 11 12.333333 H 16.333333 V 11 H 11 V 5.6666668 Z"
|
||||
class="ColorScheme-Text"
|
||||
id="path1-2" /></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user