diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-07-23 17:48:52 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-07-23 17:48:52 -0400 |
| commit | 7dde2d2b95f7935c090c66c486c891a70f185b31 (patch) | |
| tree | 7b99adf0ac4c0fbe7092a139dd4c9d127c2508a0 | |
| parent | 4e1a451ab989b32816d2d517d91fefeefeb887f3 (diff) | |
Show information about crossposts on permalink pages
| -rw-r--r-- | haunt/jakob/builder/blog.scm | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm index 7457010..b3100fe 100644 --- a/haunt/jakob/builder/blog.scm +++ b/haunt/jakob/builder/blog.scm @@ -47,31 +47,38 @@ (define (render-article post) "Return the SHTML for POST's contents." `(main - (h1 ,(post-ref post 'title)) - (p ,(date->string (post-date post) "~B ~d, ~Y") - " ❖ " - "Tags: " - ,@(intersperse - (map (lambda (tag) - (hyperlink (tag-uri %tag-prefix tag) tag)) - (post-ref post 'tags)) - ", ")) - (article - ,(post-sxml post)) - (section - (@ (id "webmention")) - (h2 ,(hyperlink "https://indieweb.org/Webmention" "Webmentions") - " for this Page") - (ul (@ (id "webmention-container"))) - (form - (@ (action "https://webmention.io/jakob.space/webmention") - (method "post")) - (label "Have you written a " - ,(hyperlink "https://indieweb.org/responses" "response") - " to this? Let me know the URL:") - (input (@ (name "source") (type "url"))) - (input (@ (value "Send Webmention") (type "submit")))) - ,(script "webmention.js")))) + ,@(maybe-list + `(h1 ,(post-ref post 'title)) + `(p ,(date->string (post-date post) "~B ~d, ~Y") + " ❖ " + "Tags: " + ,@(intersperse + (map (lambda (tag) + (hyperlink (tag-uri %tag-prefix tag) tag)) + (post-ref post 'tags)) + ", ")) + (when (post-ref post 'crosspost) + `(p (strong "This is a summary ") + "of a post that was published elsewhere. " + "To read the full post, visit " + ,(hyperlink (post-ref post 'crosspost) "this link") + ".")) + `(article + ,(post-sxml post)) + `(section + (@ (id "webmention")) + (h2 ,(hyperlink "https://indieweb.org/Webmention" "Webmentions") + " for this Page") + (ul (@ (id "webmention-container"))) + (form + (@ (action "https://webmention.io/jakob.space/webmention") + (method "post")) + (label "Have you written a " + ,(hyperlink "https://indieweb.org/responses" "response") + " to this? Let me know the URL:") + (input (@ (name "source") (type "url"))) + (input (@ (value "Send Webmention") (type "submit")))) + ,(script "webmention.js"))))) (define (render-preview post) "Return the SHTML for a preview of POST." |