summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xguix-web10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix-web b/guix-web
index 84c53e6..73c5641 100755
--- a/guix-web
+++ b/guix-web
@@ -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)))