Add link to post from home page

This commit is contained in:
Z. Charles Dziura 2025-04-23 00:12:42 -04:00
parent ceca668c28
commit 7544f9d3b7
7 changed files with 30 additions and 33 deletions

View file

@ -1,4 +1,3 @@
import { default as dumpFilter } from '@jamshop/eleventy-filter-dump';
import { DateTime } from 'luxon';
export default async function (config) {
@ -16,6 +15,5 @@ export default async function (config) {
watch: ['src/styles/**/*.css'],
});
config.addFilter('dump', dumpFilter);
config.addFilter('formatDate', dateObj => DateTime.fromJSDate(dateObj).toUTC().toLocaleString(DateTime.DATE_MED));
}

24
package-lock.json generated
View file

@ -9,7 +9,6 @@
"version": "0.0.0",
"devDependencies": {
"@11ty/eleventy": "^3.0.0",
"@jamshop/eleventy-filter-dump": "^1.0.4",
"luxon": "^3.6.1"
}
},
@ -239,16 +238,6 @@
"node": ">=12"
}
},
"node_modules/@jamshop/eleventy-filter-dump": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@jamshop/eleventy-filter-dump/-/eleventy-filter-dump-1.0.4.tgz",
"integrity": "sha512-I0x0SAOL6huycBUi9GYKkCfErAfsiku1s45T7tgZ/QKYRvvQVO+s2JZ7uqdGuXq+4PSlkJ0I2sq/PRMtxagoMg==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-html": "0.0.7"
}
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -364,19 +353,6 @@
"node": ">=0.4.0"
}
},
"node_modules/ansi-html": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
"integrity": "sha512-JoAxEa1DfP9m2xfB/y2r/aKcwXNlltr4+0QSBC4TrLfcxyvepX2Pv0t/xpgGV5bGsDzCYV8SzjWgyCW0T9yYbA==",
"dev": true,
"engines": [
"node >= 0.8.0"
],
"license": "Apache-2.0",
"bin": {
"ansi-html": "bin/ansi-html"
}
},
"node_modules/ansi-regex": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",

View file

@ -15,7 +15,6 @@
},
"devDependencies": {
"@11ty/eleventy": "^3.0.0",
"@jamshop/eleventy-filter-dump": "^1.0.4",
"luxon": "^3.6.1"
}
}

1
src/assets/link.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="000"><path d="M432-288H288q-79.68 0-135.84-56.23Q96-400.45 96-480.23 96-560 152.16-616q56.16-56 135.84-56h144v72H288q-50 0-85 35t-35 85q0 50 35 85t85 35h144v72Zm-96-156v-72h288v72H336Zm192 156v-72h144q50 0 85-35t35-85q0-50-35-85t-85-35H528v-72h144q79.68 0 135.84 56.23 56.16 56.22 56.16 136Q864-400 807.84-344 751.68-288 672-288H528Z"/></svg>

After

Width:  |  Height:  |  Size: 440 B

View file

@ -10,12 +10,15 @@
{{ header.header(page='home') }}
<main>
{%- for post in collections.all -%}
{%- for post in collections.all | reverse -%}
{%- if post.data.type == "thought" -%}
<section class="thought">
<header>
<object data="assets/hash.svg" type="image/svg+xml"></object>
An errant thought...
<img class="hash" src="assets/hash.svg" type="image/svg+xml">
<span>An errant thought...</span>
<a href="{{ post.url }}" class="link">
<img src="assets/link.svg" type="image/svg+xml">
</a>
</header>
<div class="content">
{{ post.content | safe }}

View file

@ -69,19 +69,38 @@ main > .thought {
width: 75%;
}
main > .thought:not(:last-child) {
margin-bottom: var(--size-2x);
}
main > .thought > header {
align-items: center;
display: flex;
display: grid;
font-size: var(--font-post-header);
grid-template-columns: max-content auto max-content;
padding: var(--size-md) var(--size-md) 0 var(--size-md);
}
main > .thought > header > object {
main > .thought > header img {
height: 20px;
margin-right: var(--size-sm);
width: 20px;
}
main > .thought > header > .hash {
margin-right: var(--size-sm);
}
main > .thought > header > .link {
display: flex;
flex-direction: column;
justify-content: center;
visibility: hidden;
}
main > .thought:hover > header > .link {
visibility: visible;
}
main > .thought > .content {
border-top: 2px solid var(--color-black);
margin-top: var(--size-md);

View file

@ -0,0 +1 @@
It fills me with an inarticulable kind of love when I see my wife in her role as mother to our children. Words don't fully describe it!