diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-04-13 23:30:55 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-04-13 23:49:27 +0200 |
commit | 303a12092413c157272d78657d7c4d4c3f6b27b0 (patch) | |
tree | 2ead73262522aa159cf57c641fe9154282ddb9a0 | |
parent | roles: Add Ricardo for the web site. (diff) |
software: Generate project list with member details.
* software.md: Replace this file...
* software.sxml: ...with this new file.
* haunt.scm (read-markdown-page): Rename this procedure...
(read-page): ...to this procedure and add optional READER argument.
(static-pages): Add local definition of SXML-PAGE and use it for software.sxml.
-rw-r--r-- | haunt.scm | 18 | ||||
-rw-r--r-- | software.md | 40 | ||||
-rw-r--r-- | software.sxml | 226 | ||||
-rw-r--r-- | static/css/main.css | 38 |
4 files changed, 276 insertions, 46 deletions
@@ -127,10 +127,10 @@ | |||
127 | (define read-markdown | 127 | (define read-markdown |
128 | (reader-proc commonmark-reader)) | 128 | (reader-proc commonmark-reader)) |
129 | 129 | ||
130 | (define (read-markdown-page file posts site) | 130 | (define* (read-page file posts site #:optional (reader read-markdown)) |
131 | "Read the CommonMark page from FILE. Return its final SXML | 131 | "Read the CommonMark page from FILE. Return its final SXML |
132 | representation." | 132 | representation." |
133 | (let ((meta body (read-markdown (string-append %cwd "/" file)))) | 133 | (let ((meta body (reader (string-append %cwd "/" file)))) |
134 | (base-layout `(div (@ (class "post")) | 134 | (base-layout `(div (@ (class "post")) |
135 | (div (@ (class "post-body")) | 135 | (div (@ (class "post-body")) |
136 | ,body)) | 136 | ,body)) |
@@ -144,13 +144,19 @@ representation." | |||
144 | "Return the list of static web pages." | 144 | "Return the list of static web pages." |
145 | (define (markdown-page html md) | 145 | (define (markdown-page html md) |
146 | (lambda (site posts) | 146 | (lambda (site posts) |
147 | (make-page html (read-markdown-page md posts site) | 147 | (make-page html (read-page md posts site) |
148 | sxml->html))) | ||
149 | (define (sxml-page html sxml) | ||
150 | (lambda (site posts) | ||
151 | (make-page html (read-page sxml posts site (reader-proc sxml-reader)) | ||
148 | sxml->html))) | 152 | sxml->html))) |
149 | 153 | ||
150 | (list (markdown-page "index.html" "index.md") | 154 | (list (markdown-page "index.html" "index.md") |
151 | 155 | ||
152 | (markdown-page "/en/software/index.html" | 156 | (sxml-page "/en/software/index.html" |
153 | "software.md") | 157 | "software.sxml") |
158 | (markdown-page "/en/documents/index.html" | ||
159 | "documents.md") | ||
154 | (markdown-page "/en/contribute/index.html" | 160 | (markdown-page "/en/contribute/index.html" |
155 | "contribute.md") | 161 | "contribute.md") |
156 | (markdown-page "/en/documents/index.html" | 162 | (markdown-page "/en/documents/index.html" |
@@ -240,7 +246,7 @@ representation." | |||
240 | #:default-metadata | 246 | #:default-metadata |
241 | '((author . "The GNU Assembly") | 247 | '((author . "The GNU Assembly") |
242 | (email . "assembly@lists.gnu.tools")) | 248 | (email . "assembly@lists.gnu.tools")) |
243 | #:readers (list commonmark-reader) | 249 | #:readers (list commonmark-reader sxml-reader) |
244 | #:builders (append (list (static-directory "static")) | 250 | #:builders (append (list (static-directory "static")) |
245 | (static-pages) | 251 | (static-pages) |
246 | 252 | ||
diff --git a/software.md b/software.md deleted file mode 100644 index b53416b..0000000 --- a/software.md +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | title: Software | ||
2 | author: The GNU Assembly | ||
3 | menu: software | ||
4 | --- | ||
5 | |||
6 | # Software | ||
7 | |||
8 | Maintainers of the following projects participate in the GNU Assembly: | ||
9 | |||
10 | - GCC | ||
11 | - GNU 8sync | ||
12 | - GNU Archimedes | ||
13 | - GNU Classpath | ||
14 | - GNU Dominion | ||
15 | - GNU Gneural Network | ||
16 | - GNU Guile | ||
17 | - GNU Guile-Debbugs | ||
18 | - GNU Guile-RPC | ||
19 | - GNU Guix | ||
20 | - GNU Guix Workflow Language | ||
21 | - GNU Hurd | ||
22 | - GNU Indent | ||
23 | - GNU Libgcrypt | ||
24 | - GNU Libtasn1 | ||
25 | - GNU LilyPond | ||
26 | - GNU MCSim | ||
27 | - GNU MediaGoblin | ||
28 | - GNU Mes | ||
29 | - GNU Nano-Archimedes | ||
30 | - GNU Scientific Library | ||
31 | - GNU Shepherd | ||
32 | - GNU Source Highlight | ||
33 | - GNU adns | ||
34 | - GNU libc | ||
35 | - GNU userv | ||
36 | - GnuCOBOL | ||
37 | - GnuPG | ||
38 | - Guile-GNOME | ||
39 | - Guile-OpenGL | ||
40 | - Liquid War 6 | ||
diff --git a/software.sxml b/software.sxml new file mode 100644 index 0000000..8ef1002 --- /dev/null +++ b/software.sxml | |||
@@ -0,0 +1,226 @@ | |||
1 | (use-modules (ice-9 match) | ||
2 | (srfi srfi-9) | ||
3 | (srfi srfi-69) | ||
4 | (haunt utils)) | ||
5 | |||
6 | (define-record-type <project> | ||
7 | (project id name url members) | ||
8 | project? | ||
9 | (id project-id) | ||
10 | (name project-name) | ||
11 | (url project-url) | ||
12 | (members project-members set-project-members!)) | ||
13 | |||
14 | (define-record-type <person> | ||
15 | (make-person name url avatar) | ||
16 | person? | ||
17 | (name person-name) | ||
18 | (url person-url) | ||
19 | (avatar person-avatar)) | ||
20 | |||
21 | (define* (person name #:optional url avatar) | ||
22 | (make-person name url avatar)) | ||
23 | |||
24 | (define %projects | ||
25 | (let ((table (make-hash-table))) | ||
26 | (for-each | ||
27 | (match-lambda | ||
28 | ((id name url) | ||
29 | (hash-table-set! table id (project id name url (list))))) | ||
30 | '((8sync | ||
31 | "8sync" | ||
32 | "https://www.gnu.org/software/8sync/") | ||
33 | (adns | ||
34 | "GNU adns" | ||
35 | "https://www.gnu.org/software/adns/") | ||
36 | (archimedes | ||
37 | "GNU Archimedes" | ||
38 | "https://www.gnu.org/software/archimedes/") | ||
39 | (binutils | ||
40 | "binutils" | ||
41 | "https://www.gnu.org/software/binutils/") | ||
42 | (classpath | ||
43 | "GNU Classpath" | ||
44 | "https://www.gnu.org/software/classpath/") | ||
45 | (dominion | ||
46 | "GNU Dominion" | ||
47 | "https://savannah.gnu.org/projects/dominion") | ||
48 | (gcc | ||
49 | "GNU Compiler Collection (GCC)" | ||
50 | "https://gcc.gnu.org") | ||
51 | (gdb | ||
52 | "GDB" "https://www.gnu.org/software/gdb/") | ||
53 | (glibc | ||
54 | "GNU C Library" | ||
55 | "https://www.gnu.org/software/libc/") | ||
56 | (gneural | ||
57 | "GNU Gneural Network" | ||
58 | "https://www.gnu.org/software/gneuralnetwork/") | ||
59 | (gnucobol | ||
60 | "GnuCOBOL" | ||
61 | "https://gnucobol.sourceforge.io/") | ||
62 | (gnupg | ||
63 | "GnuPG" | ||
64 | "https://gnupg.org") | ||
65 | (gsl | ||
66 | "GNU Scientific Library" | ||
67 | "https://www.gnu.org/software/gsl/") | ||
68 | (guile | ||
69 | "GNU Guile" | ||
70 | "https://www.gnu.org/software/guile/") | ||
71 | (guile-debbugs | ||
72 | "Guile-Debbugs" | ||
73 | "https://savannah.gnu.org/projects/guile-debbugs/") | ||
74 | (guile-gnome | ||
75 | "Guile-GNOME" | ||
76 | "https://www.gnu.org/software/guile-gnome/") | ||
77 | (guile-opengl | ||
78 | "Guile-OpenGL" | ||
79 | "https://www.gnu.org/software/guile-opengl/") | ||
80 | (guile-rpc | ||
81 | "GNU Guile-RPC" | ||
82 | "https://www.gnu.org/software/guile-rpc/") | ||
83 | (guix | ||
84 | "GNU Guix" | ||
85 | "https://guix.gnu.org") | ||
86 | (gwl | ||
87 | "Guix Workflow Language" | ||
88 | "https://guixwl.org") | ||
89 | (hurd | ||
90 | "GNU Hurd" | ||
91 | "https://hurd.gnu.org") | ||
92 | (indent | ||
93 | "GNU indent" | ||
94 | "https://www.gnu.org/software/indent/") | ||
95 | (libgcrypt | ||
96 | "GNU Libgcrypt" | ||
97 | "https://gnupg.org/related_software/libgcrypt/") | ||
98 | (libtasn1 | ||
99 | "GNU Libtasn1" | ||
100 | "https://www.gnu.org/software/libtasn1/") | ||
101 | (lilypond | ||
102 | "GNU LilyPond" | ||
103 | "https://lilypond.org/") | ||
104 | (liquid-war-6 | ||
105 | "Liquid War 6" | ||
106 | "https://www.gnu.org/software/liquidwar6/") | ||
107 | (mcsim | ||
108 | "GNU MCSim" | ||
109 | "https://www.gnu.org/software/mcsim/") | ||
110 | (mediagoblin | ||
111 | "GNU MediaGoblin" | ||
112 | "https://mediagoblin.org/") | ||
113 | (mes | ||
114 | "GNU Mes" | ||
115 | "https://www.gnu.org/software/mes/") | ||
116 | (mpc | ||
117 | "GNU MPC" | ||
118 | "http://www.multiprecision.org/mpc/") | ||
119 | (nano-archimedes | ||
120 | "GNU Nano-Archimedes" | ||
121 | "https://www.gnu.org/software/archimedes/") | ||
122 | (shepherd | ||
123 | "GNU Shepherd" | ||
124 | "https://www.gnu.org/software/shepherd/") | ||
125 | (source-highlight | ||
126 | "GNU Source Highlight" | ||
127 | "https://www.gnu.org/software/src-highlite/") | ||
128 | (userv | ||
129 | "GNU userv" | ||
130 | "https://www.gnu.org/software/userv/"))) | ||
131 | table)) | ||
132 | |||
133 | (define-syntax-rule (define-member person projects ...) | ||
134 | (for-each (lambda (project-id) | ||
135 | (let ((project | ||
136 | (hash-table-ref %projects project-id | ||
137 | (lambda () | ||
138 | (error (format #false | ||
139 | "Unknown project ~a for ~a~%" | ||
140 | project-id name)))))) | ||
141 | (set-project-members! | ||
142 | project (cons person (project-members project))))) | ||
143 | (quote (projects ...)))) | ||
144 | |||
145 | (define-member (person "Carlos O'Donell") | ||
146 | glibc gdb gcc binutils) | ||
147 | (define-member (person "Mark J. Wielaard" | ||
148 | "https://gnu.wildebeest.org/blog/mjw/") | ||
149 | classpath gcc glibc gdb) | ||
150 | (define-member (person "Andy Wingo" | ||
151 | "https://wingolog.org") | ||
152 | guile guile-gnome guile-opengl) | ||
153 | (define-member (person "Ludovic Courtès" | ||
154 | "https://people.bordeaux.inria.fr/lcourtes/") | ||
155 | guix guile shepherd guile-rpc) | ||
156 | (define-member (person "Frederic Y. Bois") | ||
157 | mcsim) | ||
158 | (define-member (person "Andrej Shadura") | ||
159 | indent) | ||
160 | (define-member (person "Werner Koch") | ||
161 | gnupg libgcrypt) | ||
162 | (define-member (person "Mark Galassi") | ||
163 | gsl dominion) | ||
164 | (define-member (person "Jean Michel Sellier") | ||
165 | archimedes nano-archimedes gneural) | ||
166 | (define-member (person "Christopher Webber" | ||
167 | "https://dustycloud.org") | ||
168 | 8sync mediagoblin) | ||
169 | (define-member (person "Ian Jackson") | ||
170 | adns userv) | ||
171 | (define-member (person "Samuel Thibault") | ||
172 | hurd) | ||
173 | (define-member (person "Jan Nieuwenhuizen") | ||
174 | mes lilypond) | ||
175 | (define-member (person "Christian Mauduit") | ||
176 | liquid-war-6) | ||
177 | (define-member (person "Nikos Mavrogiannopoulos") | ||
178 | libtasn1) | ||
179 | (define-member (person "Andreas Enge") | ||
180 | mpc) | ||
181 | (define-member (person "Han-Wen Nienhuys") | ||
182 | lilypond) | ||
183 | (define-member (person "Tobias Geerinckx-Rice") | ||
184 | guix) | ||
185 | (define-member (person "Bernard Giroud") | ||
186 | gnucobol) | ||
187 | (define-member (person "Tom Tromey") | ||
188 | source-highlight) | ||
189 | (define-member (person "Jeff Law") | ||
190 | gcc) | ||
191 | (define-member (person "David Malcolm") | ||
192 | gcc) | ||
193 | (define-member (person "Ricardo Wurmus" | ||
194 | "https://elephly.net") | ||
195 | guix gwl guile-debbugs) | ||
196 | |||
197 | |||
198 | `((title . "Software") | ||
199 | (author . "The GNU Assembly") | ||
200 | (date . ,(string->date* "2021-04-13 23:00")) | ||
201 | (menu . "software") | ||
202 | (content | ||
203 | ((h2 "Software") | ||
204 | (p "Maintainers of the following projects participate in the GNU Assembly:") | ||
205 | (ul (@ (class "projects")) | ||
206 | ,@(hash-table-fold %projects | ||
207 | (lambda (key project acc) | ||
208 | (cons `(li (span | ||
209 | (a (@ (class "project-url") | ||
210 | (href ,(project-url project))) | ||
211 | ,(project-name project)) | ||
212 | ,(let ((members (project-members project))) | ||
213 | `(details | ||
214 | (summary ,(format #false "members (~a)" | ||
215 | (length members))) | ||
216 | (ul (@ (class "members")) | ||
217 | ,(map (lambda (person) | ||
218 | `(li (@ (class "person")) | ||
219 | ,(let ((home-page (person-url person))) | ||
220 | (if home-page | ||
221 | `(a (@ (href ,home-page)) | ||
222 | ,(person-name person)) | ||
223 | (person-name person))))) | ||
224 | members)))))) | ||
225 | acc)) | ||
226 | '()))))) | ||
diff --git a/static/css/main.css b/static/css/main.css index 73c2c7f..a1eddf6 100644 --- a/static/css/main.css +++ b/static/css/main.css | |||
@@ -353,5 +353,43 @@ article ul li::before { | |||
353 | font-weight: bold; | 353 | font-weight: bold; |
354 | } | 354 | } |
355 | 355 | ||
356 | article ul.projects { | ||
357 | position: relative; | ||
358 | } | ||
359 | article ul.projects details ul.members li { | ||
360 | display: inline-block; | ||
361 | list-style-type: none; | ||
362 | } | ||
363 | li.person::before { | ||
364 | content: ''; | ||
365 | } | ||
366 | |||
367 | details summary { | ||
368 | cursor: pointer; | ||
369 | color: #4D4D4D; | ||
370 | font-size: smaller; | ||
371 | } | ||
372 | |||
373 | details summary > * { | ||
374 | display: inline; | ||
375 | } | ||
376 | |||
377 | details[open] summary ~ * { | ||
378 | animation: sweep .5s ease-in-out; | ||
379 | } | ||
380 | @keyframes sweep { | ||
381 | 0% {opacity: 0; margin-top: -10px} | ||
382 | 100% {opacity: 1; margin-top: 0px} | ||
383 | } | ||
384 | |||
385 | details ul.members { | ||
386 | padding: 0; | ||
387 | margin-top: 0; | ||
388 | display: inline-block; | ||
389 | } | ||
390 | ul.members li.person + li.person { | ||
391 | margin-left: 1em; | ||
392 | } | ||
393 | |||
356 | #footer-box a { color: #333333; } | 394 | #footer-box a { color: #333333; } |
357 | #footer-box a:visited { color: #333333; } | 395 | #footer-box a:visited { color: #333333; } |