diff --git a/config/filters/dates.js b/config/filters/dates.js index 88d9e14..4d3acfe 100644 --- a/config/filters/dates.js +++ b/config/filters/dates.js @@ -1,18 +1,20 @@ module.exports = function(eleventyConfig) { - eleventyConfig.addFilter('parseDate', dateString => new Date(dateString)); - - eleventyConfig.addFilter('dateDisplay', date => new Date(date).toLocaleDateString('en-GB', { - "dateStyle": "short" - })); + eleventyConfig.addFilter('parseDate', dateString => new Date(dateString)); - eleventyConfig.addFilter('dateTimeDisplay', date => new Date(date).toLocaleString('en-GB', { - 'dateStyle': 'short', - 'timeStyle': 'short', - })); + eleventyConfig.addFilter('dateDisplay', date => new Date(date).toLocaleDateString('en-GB', { + "dateStyle": "short" + })); - eleventyConfig.addFilter('timeDisplay', date => new Date(date).toLocaleTimeString('en-GB', { - 'hour': '2-digit', - 'minute': 'numeric', - 'hour12': true - })); -} \ No newline at end of file + eleventyConfig.addFilter('dateTimeDisplay', date => new Date(date).toLocaleString('en-GB', { + 'dateStyle': 'short', + 'timeStyle': 'short', + })); + + eleventyConfig.addFilter('timeDisplay', date => new Date(date).toLocaleTimeString('en-GB', { + 'hour': '2-digit', + 'minute': 'numeric', + 'hour12': true + })); + + eleventyConfig.addFilter('rfc3339', date => new Date(date).toISOString()); +} diff --git a/src/_includes/post.njk b/src/_includes/post.njk index 5ccb33c..3bc8b1e 100644 --- a/src/_includes/post.njk +++ b/src/_includes/post.njk @@ -7,7 +7,8 @@ eleventyComputed: ---
-

{{ title | safe }}

+

{{ title | safe }}

+

Published:

{{ post.excerpt.rendered | safe }}
{{ content | safe }} @@ -17,13 +18,20 @@ eleventyComputed:

Tags:

{% endif %}
+
+

About the author

+ {% image metadata.author.avatar, "My face", "box circle u-photo", "(max-width: 500px) 50px, 100px", [50, 100] %} + +

I'm Lewis Dale, a software engineer and web developer based in the UK. I write about writing software, silly projects, and cycling. A lot of cycling. Too much, maybe.

+
+

Responses

@@ -78,4 +86,4 @@ eleventyComputed:
-
\ No newline at end of file + diff --git a/src/blog/index.html b/src/blog/index.html index eaee586..0bd69f5 100644 --- a/src/blog/index.html +++ b/src/blog/index.html @@ -12,7 +12,7 @@ pagination: {% for item in pagination.items %}
  • {{ item.title.rendered | safe }}

    - + {{ item.excerpt.rendered | safe }} Read more
  • @@ -26,4 +26,4 @@ pagination: Newer {% endif %} - \ No newline at end of file + diff --git a/src/blog/tag.html b/src/blog/tag.html index bb0f6bc..3c92ab4 100644 --- a/src/blog/tag.html +++ b/src/blog/tag.html @@ -17,10 +17,10 @@ eleventyComputed: {% for item in tag.posts %}
  • {{ item.title.rendered | safe }}

    - + {{ item.excerpt.rendered | safe }} Read more
  • {% endfor %} - \ No newline at end of file + diff --git a/src/css/exceptions/article.css b/src/css/exceptions/article.css index 0a2b270..51fe2ff 100644 --- a/src/css/exceptions/article.css +++ b/src/css/exceptions/article.css @@ -1,4 +1,12 @@ article { + .published { + color: var(--color-subtle); + display: inline-block; + font-size: var(--text-size-s); + font-style: italic; + font-weight: 300; + } + img { margin-inline-start: auto; margin-inline-end: auto; @@ -18,4 +26,28 @@ article { .p-summary { display: none; } -} \ No newline at end of file +} + +section[data-section="author"] { + display: flex; + gap: var(--space-size-m); + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + + h2 { + flex-grow: 1; + width: 100%; + } + + p { + flex-basis: 0; + flex-grow: 999; + min-inline-size: 70%; + } + + picture { + flex-basis: 7rem; + flex-grow: 1; + } +} diff --git a/src/sitemap.njk b/src/sitemap.njk index 07e4f9b..08dd9f8 100644 --- a/src/sitemap.njk +++ b/src/sitemap.njk @@ -28,7 +28,7 @@ permalink: /sitemap.xml {% for post in posts %} https://{{ metadata.site.domain }}/post/{{ post.slug }}/ - {{ post.date }}Z + {{ post.date | rfc3339 }} {% endfor %} - \ No newline at end of file +