Files
natalieee.net/www/src/templates/comments.hy
2025-05-07 17:14:45 -07:00

13 lines
692 B
Hy

(import urllib.parse [quote-plus])
(defn comments [route]
`(section (:class comments)
(h2 comments)
(form (:id comment :method post :action ~f"/comment?route={route}" :autocomplete off)
(textarea (:id comment :name comment :placeholder comment :required True :maxlength 2048))
(input (:id name :type text :name name :placeholder username :required True :maxlength 32))
(input (:id website :type text :name site :placeholder "website (not required)" :maxlength 256))
(input (:id submit :type submit :value post)))
(~f"$[ls -r ./www/data/comments/{(quote-plus route :safe "")} | xargs -I# cat ./www/data/comments/{(quote-plus route :safe "")}/#]")))