Compare commits

...

5 Commits

Author SHA1 Message Date
3de856f413 Add new /now entry 2024-04-13 21:50:15 -05:00
59484d8363 Refactor /now to use built in postslist include 2024-04-13 21:49:58 -05:00
a6bd281946 Add the latest /now entry to index page 2024-04-13 21:49:30 -05:00
049ba826dc Add option to hide author info
Allows use of post layout for /about-feeds, which fixes a layout issue
2024-04-13 21:49:01 -05:00
b1b57c7b6a Update Metadata 2024-04-13 21:47:34 -05:00
10 changed files with 52 additions and 40 deletions

View File

@ -15,7 +15,7 @@ module.exports = {
defaultPostImageAlt: "The default post image: a close picture of the dark green leaves of a plant.",
mastodonHost: "lounge.town",
mastodonUser: "nathanu",
postlistHeaderText: "Latest Posts",
postlistHeaderText: "Latest posts from the blog:",
socialLinks: [
{
title: "My Blog",

View File

@ -5,17 +5,17 @@ layout: layouts/base.njk
{%- css %}{% include "public/css/code.css" %}{% endcss %}
<article class="post">
<h1>{{ title }}</h1>
{% if not hideMetadata %}
<div class="post-metadata">
{% if author %}
<p>{% if author.url %}<a href="{{ author.url }}">{% endif %}
{% if author.name %}{{ author.name }}, {% endif %}{% if author.url %}</a>{% endif %}<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></p>
{% if author.name %}{{ author.name }},&nbsp;{% endif %}{% if author.url %}</a>{% endif %}<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></p>
{% else %}
<p>{% if metadata.author.url %}<a href="{{ metadata.author.url }}">{% endif %}
{% if metadata.author.name %}{{ metadata.author.name }}, {% endif %}{% if metadata.author.url %}</a>{% endif %}<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></p>
{% if metadata.author.name %}{{ metadata.author.name }},&nbsp;{% endif %}{% if metadata.author.url %}</a>{% endif %}<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></p>
{% endif %}
@ -33,7 +33,7 @@ layout: layouts/base.njk
{%- endfor %}
</ul>
</div>
{% endif %}
{{ content | safe }}
</article>
{% include "mastodonComments.njk" %}

View File

@ -1,5 +1,6 @@
---
layout: layouts/base.njk
layout: layouts/post.njk
hideMetadata: yep
---
# How to use feeds.
<p><!-- a <p> just to stop the dropcap from happening --></p>

View File

@ -4,11 +4,28 @@ eleventyNavigation:
key: Home
order: 1
numberOfLatestPostsToShow: 5
numberOfNowPostsToShow: 1
---
<div class="now">
<h2>What I've been up to:</h2>
{% set postsCount = collections.now | length %}
{% set latestPostsCount = postsCount | min(numberOfNowPostsToShow) %}
{% set postslist = collections.now | head(-1 * numberOfNowPostsToShow) %}
{% set postslistCounter = postsCount %}
{% set showPostListHeader = false %}
{% include "postslist.njk" %}
<a class="link-button" href="/now/">
<button type="button">
See more on the “now” page
</button>
</a>
</div>
{% set postsCount = collections.posts | length %}
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}
{% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %}
{% set postslistCounter = postsCount %}
{% set showPostListHeader = true %}
{% include "postslist.njk" %}
{% set morePosts = postsCount - numberOfLatestPostsToShow %}

View File

@ -3,13 +3,7 @@ layout: layouts/base.njk
eleventyNavigation:
key: Now
order: 4
numberOfLatestPostsToShow: 4
---
{% set postsCount = collections.now | length %}
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}
{% set postslist = collections.now | head(-1 * numberOfLatestPostsToShow) %}
{% set postslistCounter = postsCount %}
{% set morePosts = postsCount - numberOfLatestPostsToShow %}
<article>
<h1>Now: Whats Been Going on Lately?</h1>
{% set now = collections.now | last %}
@ -18,35 +12,11 @@ numberOfLatestPostsToShow: 4
<p class="metadata">Updated: {{ now.date | readableDate }} |&nbsp;<a href="https://nownownow.com/about">What is a now page?</a></p>
</article>
{% set postsCount = collections.now | removeMostRecent | length %}
{% if postsCount > 1 %}
<h2>Previous Entries:</h2>
<section class="postlist">
<div class="postlist-item-container">
{% for post in postslist | reverse %}
{% if post.data.title != now.data.title %}
<article class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
<a href="{{ post.url }}" class="postlist-link">
<div class="post-image-container">
<img class="post-image" {% if post.data.imageURL %} src="{{ post.data.imageURL }}" alt="{{ post.data.imageAlt }}" {% else %} src="{{ metadata.defaultPostImageURL }}" alt="{{ metadata.defaultPostImageAlt }}"{% endif %}>
</div>
</a>
<div class="post-copy">
<a href="{{ post.url }}" class="postlist-link">
<h3>
{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}
</h3>
</a>
<time class="postlist-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate("LLLL yyyy") }}</time>
{% if post.data.synopsis %}<p>{{ post.data.synopsis | truncate(150) | safe }}</p>{% else %}{{ post.content | truncate(150) | safe }}{% endif %}
</div>
</article>
{% endif %}
{% endfor %}
</div>
{% if morePosts > 0 %}
<a href="/tags/now"><p>See {{ morePosts }} more post{% if morePosts != 1 %}s{% endif %}</a>.</p>
{% set postslist = collections.now | removeMostRecent %}
{% set showPostListHeader = false %}
{% include "postslist.njk" %}
{% endif %}
</section>
{% endif %}

View File

@ -0,0 +1,15 @@
---
title: Touching Grass
description: What I've been up to lately — fresh air, more incense making, and doing more KDE stuff.
synopsis: I go outside, make more incense, contribute to KDE, and eat brownies.
date: 2024-04-13
imageURL: /img/justin-veenema-gf03H-I7C9Y-unsplash_copy.webp
imageAlt: A blue neon sign that reads "Time is precious."
---
For some reason, I just seem to be itching to get outside lately. Perhaps I'm coming out of some sort of hibernation — after all, spring has sprung, the ornamental pear trees are [somewhat unfortunately](https://www.vice.com/en/article/7x4zza/heres-why-the-trees-on-your-street-smell-like-semen) in full bloom, turtles are basking in the sunshine on riverside logs, and I just don't feel right if I haven't fed a duck some frozen peas in a few days. I've been making heavy use of my under-desk treadmill too; walking a few miles while checking my feeds and answering emails is a surprisingly nice thing to do in the morning after breakfast.
But lest my doctor fall and injure himself from shock, I've also been engaging in plenty of activities that *don't* involve sunshine, exercise, and fresh air. Just this morning I broke a freshly-dried batch of incense down into five inch pieces. This time I modified a previously successful build to feature rose and myrrh. While there are many varieties of myrrh, the variety I used predominantly (Commiphora Kua) is pungent, bitter, perfumey, and dignified. I wish I could describe it better, but it's quite a difficult fragrance to relate to much else. It really sings in a blend, and I thought it would play nicely with the classic combination of rose and agarwood. The sticks extruded extremely well, and they burn nicely after one night of drying. I'm going to come back to them in two weeks to see how the fragrance has turned out after they've had time to cure and settle.
I've started to muck-in a bit more with KDE which, if you don't know, is an international community that creates free and open source software. Since [my first contribution](../../blog/new-kmines-themes/) (barring bug reports) several months ago, I've been more active on the KDE forum, participating in the visual design group on Matrix and joining in conversations on KDE's GitLab when design issues arise. I may not know C++, but I have been designing things professionally for over a decade; as a huge fan of KDE and a daily user of their Plasma desktop and many KDE applications, I'm delighted to be helping. I'd also like to point out that KDE is doing some really exciting work; KDE is recommending their [Kirigami framework](https://develop.kde.org/frameworks/kirigami/) for all new KDE applications. Kirigami is a *convergent* UI framework, a framework that allows developers to easily create "beautiful apps that run on computers, phones, TVs and everything in between." KDE also has teams working on [Plasma Bigscreen,](https://plasma-bigscreen.org/) a version of the Plasma desktop for TVs, and [Plasma Mobile,](https://plasma-mobile.org/) for smartphones. *Who else* is doing this? Not only does KDE provide desktop environments for TVs, personal computers, and phones — they've created a framework that allows developers to create applications that work on all of these platforms, without making separate versions. The very same application that works on your desktop can run on your phone. How exciting!
To complete this update, my partner has recently gotten back into baking brownies, so over the past few weeks I've exercised the solemn duty of ensuring that not the least morsel of the several batches they've baked goes to waste, whether they're hazelnut and chocolate chip, walnut, or cookie butter. It's a hard life, this one. Perhaps this might go some way towards an explanation as to where all of my extra energy has come from of late.

View File

@ -54,6 +54,10 @@ module.exports = eleventyConfig => {
return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('yyyy-LL-dd');
});
eleventyConfig.addFilter("removeMostRecent", arr => {
return arr.slice(0, arr.length-1);
});
// Shortcodes
eleventyConfig.addNunjucksFilter("cowsay", cowText => {
const cowCaptionReplacementTable = [

View File

@ -200,6 +200,11 @@ header, footer, main {
nav {
grid-column: 2 / span 12;
}
.now {
display: grid;
grid-column: 1 / span 12;
padding-bottom: var(--space-xl);
}
section {
display: grid;
grid-column: 1 / span 12;

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB