capybara/templates/page.html.rkt

48 lines
1.8 KiB
Racket
Raw Permalink Normal View History

#lang capybara/template
2021-06-07 02:38:03 +00:00
`(html
([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"]))
(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"]))
,@(match (assoc-ref+ metadata 'summary #f)
2021-06-07 02:38:03 +00:00
[#f '()]
[summary
`((meta ([name "description"] [content ,summary])))])
,@(match (assoc-ref metadata 'authors #f)
2021-06-07 02:38:03 +00:00
[(or #f '()) '()]
[authors
`((meta ([name "author"] [content ,(string-join authors ", ")])))])
,@(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)]))
(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__")))