guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: website: Factorize the latest version number.


From: Ludovic Courtès
Subject: 02/03: website: Factorize the latest version number.
Date: Tue, 12 May 2015 20:45:39 +0000

civodul pushed a commit to branch master
in repository guix-artwork.

commit 7682aa0dabfa697d126d1a29dd0c1c6880bec2dc
Author: Ludovic Courtès <address@hidden>
Date:   Tue May 12 22:33:23 2015 +0200

    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.
---
 website/www.scm          |    2 +-
 website/www/download.scm |   47 ++++++++++++++++++++-------------------------
 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]