diff options
| author | Jakob L. Kreuze | 2023-08-28 19:26:29 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2023-08-28 19:26:29 -0400 |
| commit | b558db752e435cd1ae6512336d6583ce03c8ea40 (patch) | |
| tree | 5dae5f522e997b1e8cb8e4191f7ab03a2149bb62 /haunt/jakob | |
| parent | 7b24e7c7c42fa497705b51a67ead4af575224f4e (diff) | |
[comment] Re-do comment form to make less intimidating
Diffstat (limited to 'haunt/jakob')
| -rw-r--r-- | haunt/jakob/builder/blog.scm | 7 | ||||
| -rw-r--r-- | haunt/jakob/dynamic/capabilities/comment-form.scm | 33 |
2 files changed, 18 insertions, 22 deletions
diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm index c20eccc..0df5f50 100644 --- a/haunt/jakob/builder/blog.scm +++ b/haunt/jakob/builder/blog.scm @@ -86,9 +86,10 @@ (method "post")) (label "Or, if you've written about this " ,(hyperlink "https://indieweb.org/responses" "elsewhere") - ", you can send me a Webmention") - (input (@ (name "source") (type "url"))) - (input (@ (value "Send") (type "submit")))) + ", you can send me a Webmention:") + (div (@ (id "webmention-input-group")) + (input (@ (name "source") (type "url") (placeholder "https://..."))) + (input (@ (value "Send") (type "submit"))))) ,(script "section-folds.js") ,(script "comment-reaction.js"))))) diff --git a/haunt/jakob/dynamic/capabilities/comment-form.scm b/haunt/jakob/dynamic/capabilities/comment-form.scm index 9e6e81c..f7d0491 100644 --- a/haunt/jakob/dynamic/capabilities/comment-form.scm +++ b/haunt/jakob/dynamic/capabilities/comment-form.scm @@ -33,23 +33,20 @@ render-dynamic-comment-form get-comment-form)) -(define (render-commenter-info-field) - `(fieldset (@ (id "commenter-info")) - (legend "Commenter Info") - (label (@ (for "name")) "Name:") - (input (@ (type "text") (id "name") (name "name") (required #t) (size 24))) - (label (@ (for "email")) "Email (optional, used for Gravatar):") - (input (@ (type "text") (id "email") (name "email") (size 24))) - (label (@ (for "url")) "Webpage URL (optional):") - (input (@ (type "text") (id "url") (name "url") (size 24))))) - -(define (render-comment-content-field) +(define (render-comment-field) `(fieldset (@ (id "comment-content")) (legend "Comment") - (label (@ (for "subject")) "Subject (optional):") - (input (@ (type "text") (id "subject") (name "subject") (size 24))) - (label (@ (for "comment")) "Comment :") - (textarea (@ (id "coment") (name "comment") (rows 4) (cols 50))))) + (label (@ (for "name") (class "required")) "Name:") + (input (@ (type "text") (id "name") (name "name") (required #t))) + (label (@ (for "email")) "Email:") + (input (@ (type "text") (id "email") (name "email"))) + (label (@ (for "url")) "Webpage URL:") + (input (@ (type "text") (id "url") (name "url"))) + (label (@ (for "subject")) "Subject:") + (input (@ (type "text") (id "subject") (name "subject"))) + (label (@ (for "comment") (class "required")) "Comment :") + (textarea (@ (id "coment") (name "comment"))) + (p "(*) Indicates a required field."))) (define* (render-comment-captcha-field #:optional (captcha-id "") captcha-image #:key hidden) @@ -79,8 +76,7 @@ (h1 "Comment form") (form (@ (id "comment-input") (action "/api/comment") (method "post")) (input (@ (type "text") (name "slug") (hidden #t) (value ,slug))) - ,(render-commenter-info-field) - ,(render-comment-content-field) + ,(render-comment-field) ,(render-comment-captcha-field captcha-id captcha-image)) ,(script "proof-of-work.js"))) @@ -99,8 +95,7 @@ (id "reply-to") (hidden #t) (value ""))) - ,(render-commenter-info-field) - ,(render-comment-content-field) + ,(render-comment-field) (fieldset (@ (id "captcha-trigger-block")) (legend "Captcha") (label "You need to complete a captcha to write a comment.") |