18 lines
1.1 KiB
Hy
18 lines
1.1 KiB
Hy
(import urllib.parse [quote-plus])
|
|
|
|
(defn comments [route]
|
|
`(section (:class comments)
|
|
(div
|
|
(h2 comments)
|
|
(p "as an anti-bot measure, in order for $VIEWER's comment to be stored on the server, $VIEWER" (span (:style "font-weight: bold") " MUST ")
|
|
"enter the commit hash of the current deployment found in the bottom right of the page footer. failure to do so will result in the comment being disregarded.")
|
|
|
|
(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 commit :type text :name commit :placeholder "commit" :maxlength 8))
|
|
(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 "")}/#]")))
|