~aasg/haunted-blog

cad039e0a3f3fd3b9dee4a90fbcc4066a85af522 — Aluísio Augusto Silva Gonçalves 1 year, 2 months ago b06cea0
haunt: Don't assume all h-cards are also p-author
1 files changed, 7 insertions(+), 6 deletions(-)

M haunt.scm
M haunt.scm => haunt.scm +7 -6
@@ 59,15 59,16 @@
      ,(embedded-icon (string->symbol (string-downcase name)))
      (span ,name)))

(define (hcard name url)
  (cond
(define* (hcard name url #:key (extra-classes '()))
  (let ((classes (string-join (append extra-classes '("h-card")) " ")))
    (cond
      ((and name url)
       `(a (@ (class "p-author h-card")
       `(a (@ (class ,classes)
              (href ,url))
           ,name))
      (name
        `(span (@ (class "p-author h-card")) ,name))
      (else #f)))
        `(span (@ (class ,classes)) ,name))
      (else #f))))

;-------
;+ Theme


@@ 128,7 129,7 @@
(define (author-hcard post)
  (let* ((author-name (post-ref post 'author))
         (author-url (post-ref post 'author-profile)))
    (hcard author-name author-url)))
    (hcard author-name author-url #:extra-classes '("p-author"))))

(define (cite-if-reply post)
  (let* ((irt-url (post-ref post 'in-reply-to))