;;; Copyright © 2019 Jakob L. Kreuze ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as ;;; published by the Free Software Foundation; either version 3 of the ;;; License, or (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;; General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with this program. If not, see ;;; . (use-modules (srfi srfi-19)) (define %comments `(("https://aaronparecki.com/2018/06/30/11/your-first-webmention" "@aaronpk" "<2019-05-11 Sat 17:07>" (p (@ (class "e-content")) "Hoo, this comments section is a bit of a mess. " "Anyway, I'm just testing out Webmentions like everyone else. " "Don't mind me...")) ("http://jakob.space/transition-to-haunt.html" "@jakob" "<2019-05-12 Sun 12:07>" (p (@ (class "e-content")) "Just testing out my Webmention inbox widget.")))) (define (h-card) `(div (@ (class "u-author h-card")) (img (@ (src "/images/favicon.png") (class "u-photo"))) (a (@ (href "http://jakob.space") (class "u-url p-name")) (p "Jakob L. Kreuze")))) (define (comment target-uri target-handle date sxml) (let ((date (string->date date "<~Y-~m-~d ~a ~H:~M>"))) `(li (@ (class "h-entry")) ,(h-card) (p "in reply to: " (a (@ (class "u-in-reply-to") (href ,target-uri)) ,target-handle)) ,sxml (a (@ (href "http://jakob.space/outbox.html") (class "u-url")) (time (@ (class "dt-published") (datetime ,(date->string date "~Y-~m-~dT~H:~M:~S~z"))) ,(date->string date "~c")))))) `((h2 "Webmention Outbox") (ul (@ (id "webmention-container")) ,@(map (lambda (args) (apply comment args)) %comments)))