2021-06-11 08:00:42 +00:00
|
|
|
#lang capybara/template
|
2021-06-07 02:38:03 +00:00
|
|
|
|
|
|
|
`(html
|
2021-06-11 08:00:42 +00:00
|
|
|
([lang ,(assoc-ref+ metadata 'lang "en")])
|
2021-06-07 02:38:03 +00:00
|
|
|
(head
|
|
|
|
()
|
2021-06-07 07:56:53 +00:00
|
|
|
(!HTML-COMMENT () " this page made with: trans rights 🏳️⚧️ ")
|
2021-06-07 02:38:03 +00:00
|
|
|
(meta ([charset "utf-8"]))
|
2021-06-11 08:00:42 +00:00
|
|
|
(title () ,(assoc-ref+ metadata 'title "<untitled page>"))
|
2021-06-07 02:38:03 +00:00
|
|
|
(meta ([name "viewport"] [content "width=device-width, initial-scale=1"]))
|
2021-06-11 08:00:42 +00:00
|
|
|
,@(match (assoc-ref+ metadata 'summary #f)
|
2021-06-07 02:38:03 +00:00
|
|
|
[#f '()]
|
|
|
|
[summary
|
|
|
|
`((meta ([name "description"] [content ,summary])))])
|
2021-06-11 08:00:42 +00:00
|
|
|
,@(match (assoc-ref metadata 'authors #f)
|
2021-06-07 02:38:03 +00:00
|
|
|
[(or #f '()) '()]
|
|
|
|
[authors
|
|
|
|
`((meta ([name "author"] [content ,(string-join authors ", ")])))])
|
2021-06-11 08:00:42 +00:00
|
|
|
,@(match (assoc-ref metadata 'date #f)
|
2021-06-07 02:38:03 +00:00
|
|
|
[#f '()]
|
2021-06-07 03:09:23 +00:00
|
|
|
[(list yn mn dn)
|
|
|
|
`((meta ([name "DC.Date.created"]
|
2021-06-08 07:14:44 +00:00
|
|
|
[content ,(format "~a-~a-~a" (~r/pad yn 4) (~r/pad mn 2) (~r/pad dn 2))])))])
|
2021-06-24 04:16:14 +00:00
|
|
|
(meta ([name "generator"]
|
|
|
|
[content
|
|
|
|
,(format "capybara ~a https://git.lain.faith/haskal/capybara" capybara-version)]))
|
2021-06-11 08:00:42 +00:00
|
|
|
(link ([rel "shortcut icon"] [type "image/png"] [href ,(format "~a/favicon.png" base-url)]))
|
|
|
|
(link ([rel "stylesheet"] [type "text/css"] [href ,(format "~a/index.css" base-url)])))
|
2021-06-07 02:38:03 +00:00
|
|
|
(body
|
|
|
|
()
|
|
|
|
(nav
|
|
|
|
()
|
2021-06-11 10:09:29 +00:00
|
|
|
(section () ,site-toc)
|
2021-06-24 04:16:14 +00:00
|
|
|
,@(if content-toc `((section () ,content-toc)) '()))
|
2021-06-07 02:38:03 +00:00
|
|
|
(main
|
|
|
|
()
|
2021-06-24 04:16:14 +00:00
|
|
|
,@(match (assoc-ref metadata 'tags '())
|
|
|
|
['() '()]
|
|
|
|
[tags
|
|
|
|
`((p ()
|
|
|
|
"tags:"
|
|
|
|
,@(for/list ([tag (in-list tags)])
|
|
|
|
`(span ([class "page-tag"]) ,(format "#~a" tag)))))])
|
2021-06-11 09:01:34 +00:00
|
|
|
,@content)
|
2021-06-07 07:56:53 +00:00
|
|
|
;; mathjax polyfill script sentinel -- gets replaced by a script tag for crying doge chrombe
|
|
|
|
;; and with nothing for swole firefox
|
|
|
|
(div ([style "display: none"]) "__X_MATHJAX_POLYFILL_PLACEHOLDER__")))
|