From 7abdf142d447140c4f5b96c899c993f42d5490a8 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 26 Jan 2022 08:55:54 -0500 Subject: Show tag list on posts with links to their feeds. --- css/dthompson.css | 17 ++++++++++++++++- theme.scm | 7 +++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/css/dthompson.css b/css/dthompson.css index 40e63e7..9588df0 100644 --- a/css/dthompson.css +++ b/css/dthompson.css @@ -158,10 +158,25 @@ footer { .date { margin-top: -1rem; - margin-bottom: 2rem; color: #666; } +.tags { + margin-top: -1rem; + color: #666; + font-size: 80%; +} + +.tags ul { + display: inline-block; + padding-left: 0.5rem; +} + +.tags li { + display: inline-block; + padding: 0.5rem; +} + .post img, .centered-image { display: block; max-width: 100%; diff --git a/theme.scm b/theme.scm index 6d651cb..fc267e3 100644 --- a/theme.scm +++ b/theme.scm @@ -85,6 +85,13 @@ free culture works available under the " ,%cc-by-sa-link " license.") (div (@ (class "date")) ,(date->string (post-date post) "~B ~d, ~Y")) + (div (@ (class "tags")) + "Tags:" + (ul ,@(map (lambda (tag) + `(li (a (@ (href ,(string-append "/feeds/tags/" + tag ".xml"))) + ,tag))) + (assq-ref (post-metadata post) 'tags)))) (div (@ (class "post")) ,(post-sxml post)))) #:collection-template -- cgit v1.2.3