oxaliq.net/source/post-footer.txt

39 lines
1.2 KiB
Text
Raw Permalink Normal View History

2023-11-09 04:10:28 +00:00
(lambda (tag-list history-list)
(let ([class-sec `(ul ((class "tag-list")))])
`(footer
(section
(h5 "tagged")
,(begin
(for-each
(lambda (tag)
(set! class-sec
(append class-sec
;; append unwraps one layer of list, hence (( ... ))
`((li
((class "tag-item"))
(span
((class "hx-target"))
(a ((href ,(string-append "/tagged/" tag))
(hx-get ,(string-append "/hx/tagged/" tag))
(hx-target "closest span.hx-target")
(hx-swap "innerHTML"))
,tag)))))))
tag-list)
class-sec))
(hr)
(p
((class "doc-history"))
(small
,(foldr
(lambda (history acc)
(if (non-empty-string? acc)
(string-append acc "modified: " (~a history) "\n")
(string-append acc "published: " (~a history))))
""
history-list)))
(p
((class "license-info"))
(small
(a
((href "/license"))
"license"))))))