diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-05-12 22:33:23 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-05-12 22:33:23 +0200 |
commit | 7682aa0dabfa697d126d1a29dd0c1c6880bec2dc (patch) | |
tree | ff2fe01d53ca58b24adf5e4c40922d5fd19075f4 | |
parent | 650badfb1ac5559d72bab04afc393acfe23fb137 (diff) | |
download | guix-artwork-7682aa0dabfa697d126d1a29dd0c1c6880bec2dc.tar guix-artwork-7682aa0dabfa697d126d1a29dd0c1c6880bec2dc.tar.gz |
website: Factorize the latest version number.
* website/www/shared.scm (latest-guix-version): New variable.
* website/www/download.scm (download-page): Use it. Map over
'summary-box' instead of duplicating code.
* website/www.scm (main-page): Use it.
-rw-r--r-- | website/www.scm | 2 | ||||
-rw-r--r-- | website/www/download.scm | 47 | ||||
-rw-r--r-- | website/www/shared.scm | 6 |
3 files changed, 27 insertions, 28 deletions
diff --git a/website/www.scm b/website/www.scm index e7b8dad..3139b2c 100644 --- a/website/www.scm +++ b/website/www.scm @@ -59,7 +59,7 @@ composed.")) (div (@ (class "featured-actions")) (a (@ (href ,(base-url "download")) (class "action download")) - "TEST v0.8.2 (alpha)") + "TEST v" (latest-guix-version) " (alpha)") (a (@ (href ,(base-url "contribute")) (class "action contribute")) "CONTRIBUTE")))) diff --git a/website/www/download.scm b/website/www/download.scm index 494f632..761633c 100644 --- a/website/www/download.scm +++ b/website/www/download.scm @@ -60,7 +60,8 @@ dependencies.") (div (@ (id "content-box")) (article (h1 "Download") - (p "As of version 0.8.1, the Guix System Distribution " + (p "As of version " (latest-guix-version) + ", the Guix System Distribution " (a (@ (href ,(guix-url "manual/html_node/System-Installation.html"))) "can be installed") " on an i686 or x86_64 machine. It uses the " @@ -73,31 +74,25 @@ can be installed as an additional package manager on top of an installed Linux-based system.") (div (@ (class "text-center")) - ,(summary-box "GuixSD 0.8.2 (i686)" - #:description %usb-image-description - #:manual %usb-image-manual - #:image %guixsd-image) - ,(summary-box "GuixSD 0.8.2 (x86_64)" - #:description %usb-image-description - #:manual %usb-image-manual - #:image %guixsd-image) - ,(summary-box "GNU Guix 0.8.2 Binary (i686)" - #:description %binary-tarball-description - #:manual %binary-tarball-manual - #:image %guix-image) - ,(summary-box "GNU Guix 0.8.2 Binary (x86_64)" - #:description %binary-tarball-description - #:manual %binary-tarball-manual - #:image %guix-image) - ,(summary-box "GNU Guix 0.8.2 Binary (mips64el)" - #:description %binary-tarball-description - #:manual %binary-tarball-manual - #:image %guix-image) - ,(summary-box "GNU Guix 0.8.2 Binary (armv7)" - #:description %binary-tarball-description - #:manual %binary-tarball-manual - #:image %guix-image) - ,(summary-box "GNU Guix 0.8.2 Source" + ,@(map (lambda (arch) + (summary-box (string-append "GuixSD " + (latest-guix-version) + " (" arch ")") + #:description %usb-image-description + #:manual %usb-image-manual + #:image %guixsd-image)) + '("x86_64" "i686")) + ,@(map (lambda (arch) + (summary-box (string-append "GNU Guix " + (latest-guix-version) + " Binary (" arch ")") + #:description %binary-tarball-description + #:manual %binary-tarball-manual + #:image %guix-image)) + '("x86_64" "i686" "mips64el" "armhf")) + ,(summary-box (string-append "GNU Guix " + (latest-guix-version) + " Source") #:description %source-tarball-description #:manual %source-tarball-manual #:image %guix-image)) diff --git a/website/www/shared.scm b/website/www/shared.scm index f079f3a..20c81ee 100644 --- a/website/www/shared.scm +++ b/website/www/shared.scm @@ -1,10 +1,14 @@ (define-module (www shared) #:use-module (www utils) - #:export (html-page-header + #:export (latest-guix-version + html-page-header html-page-description html-page-links html-page-footer)) +(define latest-guix-version + (make-parameter "0.8.1")) + (define* (html-page-header title #:key (css "article.css")) `(head (meta (@ (charset "utf-8"))) (meta (@ (name "author") |