Rework tag box

Julien LepillerSun Mar 07 14:37:27+0100 2021

23212dc

Rework tag box

gitile/pages.scm

195195
        (map (lambda (tag) (tag-box repository-name tag)) tags))))
196196
197197
(define (tag-box repository-name tag)
198-
  (pk tag)
199198
  (match tag
200199
    (($ <mytag> name message target time)
201-
     `(div (@ (class "tag-box"))
202-
           (div (@ (class "tag"))
203-
                (p (@ (class "tag-name"))
204-
                   (a (@ (href ,repository-name "/tree/" ,target)) ,name))
205-
                (p (span (@ (class "author")))
206-
                   (span (@ (class "date"))
207-
                         ,(time->date-string time))))
208-
           (p ,message)))))
200+
     (let ((commit (get-commit repo target)))
201+
       `(div (@ (class "tag-box"))
202+
             (p (img (@ (src ,(author-image (commit-author commit))))))
203+
             (div (@ (class "tag"))
204+
                  (p (@ (class "tag-name"))
205+
                     (a (@ (href ,repository-name "/tree/" ,target)) ,name)p ,message)
206+
                  (p ,message)
207+
                  (p (span (@ (class "author"))
208+
                           (commit-author commit))
209+
                     (span (@ (class "date"))
210+
                           ,(time->date-string time)))))))))
209211
210212
(define (project-commit repository-name repo ref)
211213
  (let* ((commit (get-commit repo ref))