From c3be337ceb622c5d2da3bae54d8819ab14457514 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 14 Apr 2021 23:31:06 +0200 Subject: software: Only show projects with at least one member. --- software.sxml | 58 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/software.sxml b/software.sxml index bdf2ff9..3afe7ff 100644 --- a/software.sxml +++ b/software.sxml @@ -230,34 +230,36 @@ (content ((h2 "Software") (p "Maintainers of the following projects participate in the GNU Assembly:") - (ul (@ (class "projects")) + (ul + (@ (class "projects")) ,@(hash-table-fold %projects (lambda (key project acc) - (cons `(li (@ (class "card")) - (div - (@ (class "card-header")) - (a (@ (href ,(project-url project))) - (img (@ (class "project-logo") - (src ,(project-logo project)) - (alt ,(string-append "logo for " - (project-name project)))))) - (a (@ (class "project-url") - (href ,(project-url project))) - ,(project-name project))) - (div - (@ (class "card-body")) - ,(let ((members (project-members project))) - `(details - (summary ,(format #false "members (~a)" - (length members))) - (ul (@ (class "members")) - ,(map (lambda (person) - `(li (@ (class "person")) - ,(let ((home-page (person-url person))) - (if home-page - `(a (@ (href ,home-page)) - ,(person-name person)) - (person-name person))))) - members)))))) - acc)) + (let ((members (project-members project))) + (if (null? members) acc + (cons `(li (@ (class "card")) + (div + (@ (class "card-header")) + (a (@ (href ,(project-url project))) + (img (@ (class "project-logo") + (src ,(project-logo project)) + (alt ,(string-append "logo for " + (project-name project)))))) + (a (@ (class "project-url") + (href ,(project-url project))) + ,(project-name project))) + (div + (@ (class "card-body")) + (details + (summary ,(format #false "members (~a)" + (length members))) + (ul (@ (class "members")) + ,(map (lambda (person) + `(li (@ (class "person")) + ,(let ((home-page (person-url person))) + (if home-page + `(a (@ (href ,home-page)) + ,(person-name person)) + (person-name person))))) + members))))) + acc)))) '()))))) -- cgit v1.2.1