From 14bde5f2dd91de9a63d7e97a9a8a6d06cbcc11f0 Mon Sep 17 00:00:00 2001 From: nat Date: Tue, 13 May 2025 21:45:21 -0700 Subject: [PATCH] rewrite homepage 88x31 generation --- www/src/pages/home.hy | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/www/src/pages/home.hy b/www/src/pages/home.hy index 2b8a4c1..1ed351a 100644 --- a/www/src/pages/home.hy +++ b/www/src/pages/home.hy @@ -32,20 +32,22 @@ (with [f (open "data/88x31s.yaml" "r")] (setv 88x31s (safe-load f))) - - (+ "

entities or organizations:

" - (.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"\"{(get" - True ""))) - - "

arbitrary:

" - (.join "\n" (lfor button (get 88x31s "general") - (cond - (and (in "src" button) (in "alt" button)) - f"\"{(get" - True "")))))) + `(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 + (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")))