intro paragraph in
element.
(packages->sxml packages): add table header row to
(packages->sxml packages): add back to top of the page beneath table.
(insert-css): create new function returning page's CSS; apply whole load of new CSS.
(insert-js): create new function returning page's JavaScript.
(list-packages . args): move JavaScript to (insert-js).
(list-packages . args): move CSS to (insert-css).
---
build-aux/list-packages.scm | 148 +++++++++++++++++++++++++++++--------------
1 file changed, 102 insertions(+), 46 deletions(-)
diff --git a/build-aux/list-packages.scm b/build-aux/list-packages.scm
index ceadbef..b598b97 100755
--- a/build-aux/list-packages.scm
+++ b/build-aux/list-packages.scm
@@ -65,7 +65,8 @@ exec guile -l "$0" \
(let ((uri (license-uri license)))
(case (and=> (and uri (string->uri uri)) uri-scheme)
((http https)
- `(div (a (@ (href ,uri))
+ `(div (a (@ (href ,uri)
+ (title "Link to the full license"))
,(license-name license))))
(else
`(div ,(license-name license) " ("
@@ -78,7 +79,8 @@ exec guile -l "$0" \
(define (url system)
`(a (@ (href ,(string-append "http://hydra.gnu.org/job/gnu/master/"
(package-full-name package) "."
- system)))
+ system))
+ (title "View the status of this architecture's build at Hydra"))
,system))
`(div "status: "
@@ -92,9 +94,12 @@ exec guile -l "$0" \
(let ((description-id (symbol->string
(gensym (package-name package)))))
`(tr (td ,(if (gnu-package? package)
- `(img (@ (src "/graphics/gnu-head-mini.png")))
+ `(img (@ (src "/graphics/gnu-head-mini.png")
+ (alt "Part of GNU")
+ (title "Part of GNU")))
""))
- (td (a (@ (href ,(source-url package)))
+ (td (a (@ (href ,(source-url package))
+ (title "Link to the Guix package source code"))
,(package-name package) " "
,(package-version package)))
(td (@ (colspan "2") (height "0"))
@@ -104,7 +109,6 @@ exec guile -l "$0" \
description-id)))
,(package-synopsis package))
(div (@ (id ,description-id)
- (class "package-description")
(style "display: none;"))
,(match (package-logo (package-name package))
((? string? url)
@@ -114,7 +118,8 @@ exec guile -l "$0" \
(_ #f))
(p ,(package-description package))
,(license package)
- (a (@ (href ,(package-home-page package)))
+ (a (@ (href ,(package-home-page package))
+ (title "Link to the package's website"))
,(package-home-page package))
,(status package))))))
@@ -127,16 +132,93 @@ exec guile -l "$0" \
(img (@ (src "graphics/guix-logo.small.png")
(alt "GNU Guix and the GNU System")
(height "83em"))))
- "This web page lists the packages currently provided by the "
- (a (@ (href "manual/guix.html#GNU-Distribution"))
- "GNU system distribution")
- " of "
- (a (@ (href "/software/guix/guix.html")) "GNU Guix") ". "
- "Our " (a (@ (href "http://hydra.gnu.org/jobset/gnu/master"))
- "continuous integration system")
- " shows their current build status.")
+ (p "This web page lists the packages currently provided by the "
+ (a (@ (href "manual/guix.html#GNU-Distribution"))
+ "GNU system distribution")
+ " of "
+ (a (@ (href "/software/guix/guix.html")) "GNU Guix") ". "
+ "Our " (a (@ (href "http://hydra.gnu.org/jobset/gnu/master"))
+ "continuous integration system")
+ " shows their current build status."))
(table (@ (id "packages"))
- ,@(map package->sxml packages))))
+ (tr (th "GNU?")
+ (th "Package version")
+ (th "Package details"))
+ ,@(map package->sxml packages))
+ (a (@ (href "#intro")
+ (title "Back to top.")
+ (id "top"))
+ "^")))
+
+
+(define (insert-css)
+ "Return the CSS for the list-packages page."
+ (format #t
+""))
+
+(define (insert-js)
+ "Return the JavaScript for the list-packages page."
+ (format #t
+""))
(define (list-packages . args)
@@ -154,39 +236,13 @@ with gnu.org server-side include and all that."
(string (package-name p1) (package-name p2))))))
(format #t "
-
GNU Guix - GNU Distribution - GNU Project
-
-
-
")
- (display (sxml->xml (packages->sxml packages)))
+ (insert-css)
+ (insert-js)
+ (format #t "")
+
+ (sxml->xml (packages->sxml packages))
(format #t "