(address . bug-mumi@patchwise.org)(name . Felix Lechner)(address . felix.lechner@lease-up.com)
Requires guile-avatar from here:
The packaging code for guile-avatar can be added to Guix by accepting
this patch:
In Guix, the package should then be mentioned as an "input" to mumi,
together with an updated commit hash or version for mumi.
A live preview of this change is available at:
---
mumi/web/view/html.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
Toggle diff (54 lines)
diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm
index 2275799..bd5caec 100644
--- a/mumi/web/view/html.scm
+++ b/mumi/web/view/html.scm
@@ -19,6 +19,7 @@
;;; <http://www.gnu.org/licenses/>.
(define-module (mumi web view html)
+ #:use-module (avatar url)
#:use-module (email email)
#:use-module (mumi config)
#:use-module (mumi debbugs)
@@ -451,12 +452,12 @@ failed to process associated messages.")
,(map (match-lambda
((message-number message)
`(li
- (div
- (@ (class "avatar")
- (style ,(string-append "background-color:"
- (avatar-color (sender-email message)
- (map extract-email parties)))))
- ,(string-upcase (string-take (sender-name message) 1)))
+ (img (@ (class "avatar")
+ (style ,(string-append "background-color:"
+ (avatar-color (sender-email message)
+ (map extract-email parties))))
+ (src ,(libravatar-url (sender-email message) #:default "404"))
+ (alt ,(string-upcase (string-take (sender-name message) 1)))))
(span (@ (class "date"))
(a (@ (href ,(string-append "#" (number->string
message-number))))
@@ -621,12 +622,12 @@ currently disabled."))
(id ,(number->string message-number))))
(a (@ (class "message-anchor")
(id ,(format #false "msgid-~a" (msgid-hash (message-id message))))))
- (div
- (@ (class "avatar")
- (style ,(string-append "background-color:"
- (avatar-color (sender-email message)
- (map extract-email parties)))))
- ,(string-upcase (string-take (sender-name message) 1)))
+ (img (@ (class "avatar")
+ (style ,(string-append "background-color:"
+ (avatar-color (sender-email message)
+ (map extract-email parties))))
+ (src ,(libravatar-url (sender-email message) #:default "404"))
+ (alt ,(string-upcase (string-take (sender-name message) 1)))))
(article
(@ (class "message"))
(header
base-commit: 394c90d4a176756b9f0f4a716a2646ab98d8f167
--
2.41.0