rewrite homepage 88x31 generation
This commit is contained in:
@ -32,20 +32,22 @@
|
|||||||
|
|
||||||
(with [f (open "data/88x31s.yaml" "r")]
|
(with [f (open "data/88x31s.yaml" "r")]
|
||||||
(setv 88x31s (safe-load f)))
|
(setv 88x31s (safe-load f)))
|
||||||
|
|
||||||
(+ "<p style=\"margin-bottom: 4px;\">entities or organizations:</p>"
|
(.join "" (lfor form [
|
||||||
(.join "\n" (lfor button (get 88x31s "specific")
|
`(p (:style "margin-bottom: 4px;") "entities or organizations:")
|
||||||
|
#* (lfor button (get 88x31s "specific")
|
||||||
(cond
|
(cond
|
||||||
(and (in "host" button) (in "src" button) (in "alt" button))
|
(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>"
|
`(a (:href ~(get button "host") :target "_blank")
|
||||||
True "")))
|
(img (:src ~(get button "src") :alt ~(get button "alt"))))
|
||||||
|
True ""))
|
||||||
"<p style=\"margin-bottom: 4px;\">arbitrary:</p>"
|
`(p (:style "margin-bottom: 4px") "arbitrary:")
|
||||||
(.join "\n" (lfor button (get 88x31s "general")
|
#* (lfor button (get 88x31s "general")
|
||||||
(cond
|
(cond
|
||||||
(and (in "src" button) (in "alt" button))
|
(or (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")}\"")}/>"
|
`(img (:src ~(get button "src") :alt ~(get button "alt")))
|
||||||
True ""))))))
|
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: "
|
(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")))
|
(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")))
|
||||||
|
Reference in New Issue
Block a user