diff options
-rwxr-xr-x | guix-web | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -206,6 +206,13 @@ (dd ,(render-package-license package)))) (let ((packages (find-packages-by-name name))) + (define (format-package-count) + (let ((count (length packages))) + (format #f "~d ~a" + count + (if (> count 1) + "versions" + "version")))) `(html (head (title ,(string-append "GNU Guix - " name)) @@ -214,7 +221,8 @@ (body (div (@ (class "container")) (image (@ (src "/images/logo.png"))) - (h1 ,name (span (@ (class "badge")) ,(length packages))) + (h1 ,name (span (@ (class "badge")) + ,(format-package-count))) (ul (@ (class "list-unstyled")) ,@(map (lambda (p) `(li ,(describe-package p))) |