oxaliq.net/source/post-footer.scm

42 lines
1.3 KiB
Scheme
Raw Permalink Normal View History

2024-01-22 01:32:54 +00:00
(lambda (source-url tag-list history-list)
2023-11-09 04:10:28 +00:00
(let ([class-sec `(ul ((class "tag-list")))])
`(footer
2024-01-22 01:32:54 +00:00
(a ((href ,source-url))
"view source")
(hr)
2023-11-09 04:10:28 +00:00
(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
2024-01-22 01:14:54 +00:00
((href "static/license/license.txt"))
2023-11-09 04:10:28 +00:00
"license"))))))