From f6bd35e8e10faf4db80d6c8ccb45a5beae44c2be Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sat, 7 May 2022 21:53:34 -0400 Subject: [scheme] Initial comments API --- haunt/jakob/builder/blog.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'haunt/jakob') diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm index 8f02a80..2e54998 100644 --- a/haunt/jakob/builder/blog.scm +++ b/haunt/jakob/builder/blog.scm @@ -79,6 +79,37 @@ ,(hyperlink (post-ref post 'crosspost) "this link") ".")) (article ,(post-sxml post)) + (section + (@ (id "comments")) + (h2 "Comments for this Page") + (ul (@ (id "comment-container"))) + (form + (@ (action "https://jakob.space/api/comment") + (method "post")) + (label (@ (for "name")) "Name:") + (br) + (input (@ (name "name") (id "name") (type "text"))) + (br) + (label (@ (for "email")) "Email (optional; only used for Gravatar):") + (br) + (input (@ (name "email") (id "email") (type "text"))) + (br) + (label (@ (for "url")) "Homepage (optional):") + (br) + (input (@ (name "url") (id "url") (type "text"))) + (br) + (label (@ (for "comment")) "Comment (Markdown supported):") + (br) + (textarea (@ (name "comment") (id "comment") (rows "4") (cols "50") (maxlength "1024"))) + (br) + (label (@ (for "captcha")) "Captcha: Please integrate the following definite integral.") + (br) + (img (@ (id "captcha") (alt "captcha-image"))) + (br) + (input (@ (name "captcha") (id "captcha") (type "text"))) + (br) + (input (@ (value "Submit") (type "submit")))) + ,(script "local.js")) (section (@ (id "webmention")) (h2 ,(hyperlink "https://indieweb.org/Webmention" "Webmentions") -- cgit v1.3