rewrite homepage 88x31 generation

This commit is contained in:
2025-05-13 21:45:21 -07:00
parent df89149131
commit 14bde5f2dd

View File

@ -33,19 +33,21 @@
(with [f (open "data/88x31s.yaml" "r")]
(setv 88x31s (safe-load f)))
(+ "<p style=\"margin-bottom: 4px;\">entities or organizations:</p>"
(.join "\n" (lfor button (get 88x31s "specific")
(.join "" (lfor form [
`(p (:style "margin-bottom: 4px;") "entities or organizations:")
#* (lfor button (get 88x31s "specific")
(cond
(and (in "host" button) (in "src" button) (in "alt" button))
f"<a href=\"{(get button "host")}\"><img src=\"{(get button "src")}\" alt=\"{(get button "alt")}\" {(when (in "title" button) f"title=\"{(get button "title")}\"")}/></a>"
True "")))
"<p style=\"margin-bottom: 4px;\">arbitrary:</p>"
(.join "\n" (lfor button (get 88x31s "general")
`(a (:href ~(get button "host") :target "_blank")
(img (:src ~(get button "src") :alt ~(get button "alt"))))
True ""))
`(p (:style "margin-bottom: 4px") "arbitrary:")
#* (lfor button (get 88x31s "general")
(cond
(and (in "src" button) (in "alt" button))
f"<img src=\"{(get button "src")}\" alt=\"{(get button "alt")}\" {(when (in "title" button) f"title=\"{(get button "title")}\"")}/>"
True ""))))))
(or (in "src" button) (in "alt" button))
`(img (:src ~(get button "src") :alt ~(get button "alt")))
True ""))
] (form->html form)))))
(p "the reader may request their button be displayed here by e-mailing their domain, button, and alt-text for the button to the following e-mail: "
(a (:href "mailto:natalieee.net+88x31@8.f.9.e.0.7.4.0.1.0.0.2.ip6.arpa") "natalieee.net+88x31@8.f.9.e.0.7.4.0.1.0.0.2.ip6.arpa")))