website

Le code pour générer le site web du duché perché.
Log | Files | Refs

commit ca3e6c8de81d0e741d67c504403720436b1fb859
parent b0eaa26cb46650e94b2a5330190caf31ee89063e
Author: Adriel Dumas--Jondeau <leirda@disroot.org>
Date:   Wed, 19 Jun 2024 22:51:48 +0200

Ajoute `urls' pour afficher plusieurs liens d’un coup

Diffstat:
Mduper.scm | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/duper.scm b/duper.scm @@ -1,13 +1,11 @@ (define-module (duper) + #:use-module (ice-9 match) #:use-module (ice-9 textual-ports) #:use-module (sxml match) #:use-module (sxml simple) #:re-export (xml->sxml)) -(define (url to desc) - `(ul (li (a (@ (href ,to)) ,desc)))) - (define (svg-uns sxml) (sxml-match sxml ((ns:svg (@ . ,a) . ,r) `(svg (@ ,@a) ,(map svg-uns r))) @@ -25,6 +23,14 @@ `((ns . ,ns))))))) (svg-uns (caddr sxml)))) +(define-public (urls xs) + `(ul ,@(map (match-lambda + ((to . desc) `(li (a (@ (href ,to)) ,desc)))) + xs))) + +(define-public (url to desc) + (urls `((,to . ,desc)))) + (define-public make-date* (@ (haunt skribe utils) make-date*))