sorrel
7a0172ae64
All checks were successful
ci/woodpecker/push/build-and-deploy Pipeline was successful
42 lines
No EOL
1.3 KiB
Scheme
42 lines
No EOL
1.3 KiB
Scheme
(lambda (source-url tag-list history-list)
|
|
(let ([class-sec `(ul ((class "tag-list")))])
|
|
`(footer
|
|
(a ((href ,source-url))
|
|
"view source")
|
|
(hr)
|
|
(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 "static/license/license.txt"))
|
|
"license")))))) |