summaryrefslogtreecommitdiffstats
path: root/people.sxml
blob: f8dd0456fe1a178400bf43a24043bb7408f5ab1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(use-modules (srfi srfi-1))

(include "projects.scm")

(define %members
  ;; List of member/projects tuples.
  (let ((table (make-hash-table eq? hashq)))
    (hash-table-fold %projects
                     (lambda (key project lst)
                       (for-each (lambda (member)
                                   (let ((projects (hash-table-ref/default
                                                    table member '())))
                                     (hash-table-set! table member
                                                      (cons project
                                                            projects))))
                                 (project-members project)))
                     '())
    (sort (delete-duplicates
           (hash-table-fold table alist-cons '()))
          (match-lambda*
            (((member1 . _) (member2 . _))
             (string<? (person-name member1)
                       (person-name member2)))))))

`((title . "Software")
  (author . "The GNU Assembly")
  (menu . "people")
  (date . ,(string->date* "2021-04-14 23:00"))

  (content
   ((h2 "People")
    (p "The following maintainers and contributors participate in "
       "the GNU Assembly and have endorsed the "
       (a (@ (href "/en/documents/social-contract"))
          "Social Contract") ":")

    (ul ;; (@ (class "projects"))
        ,@(map (match-lambda
                 ((person projects ...)
                  `(li (@ (class "person"))
                       ,(let ((home-page (person-url person)))
                          (if home-page
                              `(a (@ (href ,home-page))
                                  ,(person-name person))
                              (person-name person)))
                       " ("
                       ,(string-join (map project-name projects)
                                    ", ")
                       ")")))
               %members)))))