summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2022-01-26 08:55:54 -0500
committerDavid Thompson <dthompson2@worcester.edu>2022-01-26 08:55:54 -0500
commit7abdf142d447140c4f5b96c899c993f42d5490a8 (patch)
treef7b76e2fb8309fd1c41fe94be32da699b72edd65
parent4ec0f6f33518c9af7f0f3eb7c1a8cc62ba34ae64 (diff)
Show tag list on posts with links to their feeds.
-rw-r--r--css/dthompson.css17
-rw-r--r--theme.scm7
2 files changed, 23 insertions, 1 deletions
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