diff options
| author | Dennis Fink | 2026-10-23 20:22:54 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-10-23 20:22:54 +0200 |
| commit | 5986c6e4f3fb37d727b1d2d698cb8fbe50e3fea9 (patch) | |
| tree | de8a75e4fbec634a4fdfba578b9e2131d298a71a | |
| parent | 291f6132207ce3fcbf6845555411c5b816d96170 (diff) | |
| download | dennisfink.me-5986c6e4f3fb37d727b1d2d698cb8fbe50e3fea9.tar.gz dennisfink.me-5986c6e4f3fb37d727b1d2d698cb8fbe50e3fea9.zip | |
Add email reply links to blog posts
This adds an email reply link to every blog post, allowing readers to
respond directly with a prefilled subject line. The email address is
encoded using HTML entities to discourage simple address harvesting.
It also reorganizes the article footer into separate sections for tags,
replies, and changelogs, with consistent typography and spacing.
Diffstat (limited to '')
| -rw-r--r-- | assets/static/css/style.css | 11 | ||||
| -rw-r--r-- | templates/macros/blog.html | 46 |
2 files changed, 32 insertions, 25 deletions
diff --git a/assets/static/css/style.css b/assets/static/css/style.css index dd1ed80..1275b1a 100644 --- a/assets/static/css/style.css +++ b/assets/static/css/style.css @@ -664,14 +664,18 @@ article { } & > footer { - margin-top: 1.5rem; color: var(--dim-foreground); font-style: italic; + font-size: 1.2rem; + line-height: 1.5; + margin-top: 1.5rem; + + & > section:not(:first-of-type) { + margin-top: 0.75rem; + } ul { display: block; - font-size: 1.2rem; - line-height: 1.5; list-style: none; margin: 0; padding: 0; @@ -686,7 +690,6 @@ article { } .changelog { - margin-top: 1.5rem; font-size: 0.85rem; & > h3 { diff --git a/templates/macros/blog.html b/templates/macros/blog.html index d076762..c3b5390 100644 --- a/templates/macros/blog.html +++ b/templates/macros/blog.html @@ -84,9 +84,9 @@ {% endif %} </header> <div class="e-content">{{ post.body }}</div> - {% if post.tags or post.changelog %} - <footer> - {% if post.tags %} + <footer> + {% if post.tags %} + <section> <ul aria-label="Tags"> <li>Tagged with</li> {% for tag in post.tags %} @@ -99,24 +99,28 @@ </li> {% endfor %} </ul> - {% endif %} - {% if post.changelog %} - <section class="changelog" aria-labelledby="changelog-heading"> - <h3 id="changelog-heading">Changelog</h3> - <ul> - {% for entry in post.changelog.blocks %} - <li> - <time datetime="{{ entry.date | dateformat('yyyy-MM-dd') }}"> - {{ entry.date | dateformat("d MMMM yyyy") }} - </time> - <span>{{ entry.description }}</span> - </li> - {% endfor %} - </ul> - </section> - {% endif %} - </footer> - {% endif %} + </section> + {% endif %} + <section> + <p>Reply to this post by <a rel="nofollow" + href="mailto:me+blog@dennisfink.me?subject=RE: {{ post.title }}">email</a>.</p> + </section> + {% if post.changelog %} + <section class="changelog" aria-labelledby="changelog-heading"> + <h3 id="changelog-heading">Changelog</h3> + <ul> + {% for entry in post.changelog.blocks %} + <li> + <time datetime="{{ entry.date | dateformat('yyyy-MM-dd') }}"> + {{ entry.date | dateformat("d MMMM yyyy") }} + </time> + <span>{{ entry.description }}</span> + </li> + {% endfor %} + </ul> + </section> + {% endif %} + </footer> </article> {% endmacro %} |
