>From c36af581753b015f31a562d2fe8992465d15f36e Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Fri, 8 May 2015 04:56:17 +0200 Subject: [PATCH 3/3] website: Fix URLs. --- website/www.scm | 45 ++++++++++++++++++------------------ website/www/about.scm | 6 ++--- website/www/contribute.scm | 23 ++++++++++--------- website/www/donate.scm | 25 ++++++++++---------- website/www/download.scm | 17 +++++++------- website/www/help.scm | 57 +++++++++++++++++++++++----------------------- website/www/shared.scm | 29 +++++++++++------------ website/www/utils.scm | 37 ++++++++++++++++++++++++++++++ 8 files changed, 141 insertions(+), 98 deletions(-) create mode 100644 website/www/utils.scm diff --git a/website/www.scm b/website/www.scm index 36d7ee7..9a3fad0 100644 --- a/website/www.scm +++ b/website/www.scm @@ -1,4 +1,5 @@ (define-module (www) + #:use-module (www utils) #:use-module (www shared) #:use-module (www packages) #:use-module (www download) @@ -35,13 +36,13 @@ (class "hlink-yellow")) "GNU Project ") "—which respects the " - (a (@ (href "http://www.gnu.org/philosophy/free-sw.html") + (a (@ (href "https://www.gnu.org/philosophy/free-sw.html") (class "hlink-yellow")) "freedom of computer users") ". ") (li (b "Dependable.") " The " - (a (@ (href "/software/guix/manual/") + (a (@ (href "https://www.gnu.org/s/guix/manual/") (class "hlink-yellow")) "GNU Guix") " Package Manager, in addition to standard @@ -56,10 +57,10 @@ unprivileged package management, per-user profiles, and garbage collection.") domain-specific languages (EDSLs), to describe how packages are built and composed.")) (div (@ (class "featured-actions")) - (a (@ (href "/software/guix/download/") + (a (@ (href ,(url-base "/download")) (class "action download")) "TEST v0.8.2 (alpha)") - (a (@ (href "/software/guix/contribute/") + (a (@ (href ,(url-base "/contribute")) (class "action contribute")) "CONTRIBUTE")))) (div (@ (id "discovery-box")) @@ -67,15 +68,15 @@ composed.")) (div (@ (class "info-box text-center")) (video (@ (src "http://audio-video.gnu.org/video/misc/2015-01__GNU_Guix__The_Emacs_of_Distros.webm") (poster - "/software/guix/static/base/img/the-emacs-of-distros.png") + ,(img-url "the-emacs-of-distros.png")) (controls "controls") (class "video-preview"))) (p "January 2015, The Emacs of Distros (48 minutes)") - (p (a (@ (href "/software/guix/help/#talks") + (p (a (@ (href ,(url-base "/help/#talks")) (class "hlink-more-light")) "Check all talks"))) (div (@ (class "info-box text-left")) - (p (a (@ (href "/software/guix/manual/") + (p (a (@ (href "https://www.gnu.org/s/guix/manual") (class "hlink-yellow")) "GNU Guix Documentation") (br) @@ -93,38 +94,38 @@ packaging API. ") "GNU Manuals Online") (br) "Primary documentation for official GNU packages.") - (p (a (@ (href "/software/guix/help/") + (p (a (@ (href ,(url-base "/help")) (class "hlink-more-light")) "Find more documentation"))) - (img (@ (src "/software/guix/static/base/img/h-separator-darker.png") + (img (@ (src ,(img-url "h-separator-darker.png")) (class "h-separator") (alt ""))) (div (@ (id "screens-box")) - (a (@ (href "/software/guix/screenshots/0.8.2/grub-menu.png")) - (img (@ (src "/software/guix/static/base/img/screenshots/grub-menu-thumb.png") + (a (@ (href ,(screenshot-url "0.8.2" "grub-menu.png"))) + (img (@ (src ,(thumb-url "grub-menu-thumb.png")) (class "screenshot-thumb") (alt "GRUB menu")))) - (a (@ (href "/software/guix/screenshots/0.8.2/slim.png")) - (img (@ (src "/software/guix/static/base/img/screenshots/slim-thumb.png") + (a (@ (href ,(screenshot-url "0.8.2" "slim.png"))) + (img (@ (src ,(thumb-url "slim-thumb.png")) (class "screenshot-thumb") (alt "Slim login manager")))) - (a (@ (href "/software/guix/screenshots/0.8.2/windowmaker+icecat+inkscape.png")) - (img (@ (src "/software/guix/static/base/img/screenshots/windowmaker+icecat+inkscape-thumb.png") + (a (@ (href ,(screenshot-url "0.8.2" "windowmaker+icecat+inkscape.png"))) + (img (@ (src ,(thumb-url "windowmaker+icecat+inkscape-thumb.png")) (class "screenshot-thumb") (alt "Windowmaker, Icecat, and Inkscape")))) - (a (@ (href "/software/guix/screenshots/0.8.2/user-interfaces.png")) - (img (@ (src "/software/guix/static/base/img/screenshots/user-interfaces-thumb.png") + (a (@ (href ,(screenshot-url "0.8.2" "user-interfaces.png"))) + (img (@ (src ,(thumb-url "user-interfaces-thumb.png")) (class "screenshot-thumb") (alt "mplayer and xterm")))) - (a (@ (href "/software/guix/screenshots/0.8.2/emacs-ui-packages.png")) - (img (@ (src "/software/guix/static/base/img/screenshots/emacs-ui-packages-thumb.png") + (a (@ (href ,(screenshot-url "0.8.2" "emacs-ui-packages.png"))) + (img (@ (src ,(thumb-url "emacs-ui-packages-thumb.png")) (class "screenshot-thumb") (alt "Emacs user interface to the package manager.")))) - (a (@ (href "/software/guix/screenshots/0.8.2/emacs-ui-generations.png")) - (img (@ (src "/software/guix/static/base/img/screenshots/emacs-ui-generations-thumb.png") + (a (@ (href ,(screenshot-url "0.8.2" "emacs-ui-generations.png"))) + (img (@ (src ,(thumb-url "emacs-ui-generations-thumb.png")) (class "screenshot-thumb") (alt "Emacs user interface generations."))))) - (p (a (@ (href "/software/guix/contribute/") + (p (a (@ (href ,(url-base "/contribute") ) (class "hlink-yellow-boxed")) "Help us package more software →"))) (div (@ (id "news-box")) diff --git a/website/www/about.scm b/website/www/about.scm index 128041d..34cc20c 100644 --- a/website/www/about.scm +++ b/website/www/about.scm @@ -17,7 +17,7 @@ (em "GNU Guix") " package manager are free software projects developed by the " - (a (@ (href "http://www.gnu.org/")) + (a (@ (href "https://www.gnu.org")) "GNU Project") " and independent volunteers from various parts of the world. This is the official website for both projects. ") @@ -30,7 +30,7 @@ understand the concept, you should think of \"free\" as in \"free speech\", not as in \"free beer\". ") (p "More precisely, free software means users of a program have the " - (a (@ (href "/philosophy/free-sw.html")) + (a (@ (href "https://www.gnu.org/philosophy/free-sw.html")) "four essential freedoms") ":") (ul (li "The freedom to run the program as you wish, for any @@ -52,7 +52,7 @@ Courtès. Please use the " (h2 (@ (id "license")) "Licensing") (p "Guix is free software; you can redistribute it and/or modify it under the terms of the " - (a (@ (rel "license") (href "/licenses/gpl.html")) + (a (@ (rel "license") (href "http://www.gnu.org/licenses/gpl.html")) "GNU General Public License") " as published by the Free Software Foundation; either version\xa03 of the License, or (at your option) any later version. ") diff --git a/website/www/contribute.scm b/website/www/contribute.scm index 076412a..e81ed38 100644 --- a/website/www/contribute.scm +++ b/website/www/contribute.scm @@ -1,4 +1,5 @@ (define-module (www contribute) + #:use-module (www utils) #:use-module (www shared) #:export (contribute-page)) @@ -53,7 +54,7 @@ the project is available in the " (h2 (@ (id "documentation")) "Documentation") (p "You can read the " - (a (@ (href "/software/guix/help/")) + (a (@ (href ,(url-base "/help"))) "project documentation") " already available in the system and in the website, and help us identify any errors or omissions. Creating new manuals, @@ -61,7 +62,7 @@ tutorials, and blog entries will also help users and developers discover what we do. ") (p "Helping improve the documentation of the " - (a (@ (href "/software/guix/packages/")) + (a (@ (href ,(url-base "/packages"))) "packaged software") " is another way to contribute. ") (a (@ (href "http://lists.gnu.org/mailman/listinfo/guix-devel") @@ -74,7 +75,7 @@ need to be packaged to make it easier for users to install their favorite tools with the Guix package manager, and be productive using the system. ") (p "Information on how to add packages to the distribution can be found " - (a (@ (href "/software/guix/manual/guix.html#Packaging-Guidelines")) + (a (@ (href "https://www.gnu.org/software/guix/manual/guix.html#Packaging-Guidelines")) "in the manual") ". ") (a (@ (href "http://lists.gnu.org/mailman/listinfo/guix-devel") @@ -83,12 +84,12 @@ distribution can be found " (div (@ (class "summary-box")) (h2 (@ (id "programming")) "Programming") (p "We use " - (a (@ (href "/software/guile/")) + (a (@ (href "https://www.gnu.org/software/guile/")) "GNU Guile") " as the main programming and extension language for the components of the system. ") (p "You will find it useful to browse the " - (a (@ (href "/software/guile/manual")) + (a (@ (href "https://www.gnu.org/software/guile/manual")) "Guile's manual") " or other " (a (@ (href "http://schemers.org/Documents/#intro-texts")) @@ -109,7 +110,7 @@ all the contributors to communicate and collaborate in the project, and users to be able to download and install packages. Help us keep the system up and running smoothly. ") (p "You can also " - (a (@ (href "/software/guix/donate/")) + (a (@ (href "https://www.gnu.org/software/guix/donate/")) "donate hardware or hosting") ". ") (a (@ (href "http://lists.gnu.org/mailman/listinfo/guix-devel") @@ -122,10 +123,10 @@ smoothly. ") community about your experience. Help the project reporting bugs.") (p "Before reporting a bug, please check whether the bug is already " - (a (@ (href "http://debbugs.gnu.org/guix")) + (a (@ (href "https://debbugs.gnu.org/guix")) "in the bug database") ". See " - (a (@ (href "http://debbugs.gnu.org/Developer.html")) + (a (@ (href "https://debbugs.gnu.org/Developer.html")) "the developer information page") " for more information on how to manipulate bug reports. ") @@ -137,15 +138,15 @@ reports. ") (p "You can help us translate software and documentation to your language. The main components of the Guix System Distribution, including the Guix package manager, can be translated in the " - (a (@ (href "http://translationproject.org/")) + (a (@ (href "https://translationproject.org/")) "Translation Project") ".") (p "Other " - (a (@ (href "/software/guix/packages/")) + (a (@ (href ,(url-base "/packages"))) "software packaged") " for the system may have their own translation tools. Visit their websites and help translate. ") - (a (@ (href "http://translationproject.org/") + (a (@ (href "https://translationproject.org/") (class "hlink-more-dark")) "Start translating"))) (h2 (@ (id "resources")) diff --git a/website/www/donate.scm b/website/www/donate.scm index 5ded10a..33f8c5f 100644 --- a/website/www/donate.scm +++ b/website/www/donate.scm @@ -1,4 +1,5 @@ (define-module (www donate) + #:use-module (www utils) #:use-module (www shared) #:export (donate-page)) @@ -17,7 +18,7 @@ " of the Guix System Distribution runs on donated hardware and hosting. Please consider helping the project with donations. ") (p "As the distribution grows (see the " - (a (@ (href "/software/guix/packages/")) + (a (@ (href ,(url-base "/packages"))) "package list") "), so do the computing and storage needs. We are looking for donations of hardware and optionally hosting for the following kinds of @@ -31,9 +32,9 @@ binaries for the " ";") (li "mips64el machines to strengthen this port.")) (p "Please get in touch with us through the " - (a (@ (href "/software/guix/about/#contact")) + (a (@ (href ,(url-base "/about/#contact"))) "usual channels") - "or using the address@hidden private alias to discuss + " or using the address@hidden private alias to discuss any opportunities. ") (h2 (@ (id "hardware-donors")) "Thanks to the donors!") (p "The table below summarizes hardware and hosting donations @@ -47,23 +48,23 @@ reality.") (th "donors"))) (tbody (tr (td "hydra.gnu.org") (td "build farm front-end") - (td (ul (li (a (@ (href "http://www.fsf.org/")) - "Free Software \t Foundation"))))) + (td (ul (li (a (@ (href "https://www.fsf.org/")) + "Free Software Foundation"))))) (tr (td "hydra.gnunet.org") (td "x86_64-linux, i686-linux") (td (ul (li (a (@ (href "https://gnunet.org/fsnsg")) - "Free Secure -Network Systems Group") + "Free Secure Network Systems +Group") " at the " - (a (@ (href "http://www.tum.de/")) - "Technische -Universität München"))))) + (a (@ (href "https://www.tum.de/")) + "Technische Universität +München"))))) (tr (td "chapters.gnu.org") (td "x86_64-linux, i686-linux") - (td (ul (li (a (@ (href "http://es.gnu.org")) + (td (ul (li (a (@ (href "https://es.gnu.org")) "GNU\xa0España") " (hardware)") - (li (a (@ (href "http://fsffrance.org/index.en.html")) + (li (a (@ (href "https://fsffrance.org/index.en.html")) "FSF\xa0France") " (hosting)")))) (tr (td "wildebeest") diff --git a/website/www/download.scm b/website/www/download.scm index 35a86ec..030ca6b 100644 --- a/website/www/download.scm +++ b/website/www/download.scm @@ -1,4 +1,5 @@ (define-module (www download) + #:use-module (www utils) #:use-module (www shared) #:export (download-page)) @@ -12,20 +13,20 @@ (article (h1 "Download") (p "As of version 0.8.1, the Guix System Distribution " - (a (@ (href "/software/guix/manual/html_node/System-Installation.html")) + (a (@ (href "https://www.gnu.org/s/guix/manual/html_node/System-Installation.html")) "can be installed") " on an i686 or x86_64 machine. It uses the " (a (@ (href "/software/linux-libre")) "Linux-Libre") " kernel and the " - (a (@ (href "/software/dmd")) "GNU dmd") + (a (@ (href "https://www.gnu.org/software/dmd")) "GNU dmd") " init system. Alternately, its package manager, GNU Guix, can be installed as an additional package manager on top of an installed Linux-based system.") (div (@ (class "text-center")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/GuixSD-package.png") + (img (@ (src ,(img-url "GuixSD-package.png")) (alt "")))) (h2 "GuixSD 0.8.2 (i686)") (p "USB installer for machines with the following @@ -47,7 +48,7 @@ minimum system requirements:") (br) (a (@ (href "#")) "Get signature")) (p "See the " - (a (@ (href "/software/guix/manual/html_node/System-Installation.html")) + (a (@ (href "https://www.gnu.org/s/guix/manual/html_node/System-Installation.html")) "installation instructions") " from the manual.") (p "Alternative download methods: " @@ -55,7 +56,7 @@ minimum system requirements:") ".")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/GuixSD-package.png") + (img (@ (src ,(img-url "GuixSD-package.png")) (alt "")))) (h2 "GuixSD 0.8.2 (x86_64)") (p "USB installer for machines with the following @@ -77,7 +78,7 @@ minimum system requirements:") (br) (a (@ (href "#")) "Get signature")) (p "See the " - (a (@ (href "/software/guix/manual/html_node/System-Installation.html")) + (a (@ (href "https://www.gnu.org/s/guix/manual/html_node/System-Installation.html")) "installation instructions") " from the manual.") (p "Alternative download methods: " @@ -85,7 +86,7 @@ minimum system requirements:") ".")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/Guix-package.png") + (img (@ (src ,(img-url "Guix-package.png")) (alt "")))) (h2 "GNU Guix 0.8.2") (p "Archive distribution to install from source on @@ -107,7 +108,7 @@ machines with the following minimum system requirements:") (br) (a (@ (href "#")) "Get signature")) (p "See the " - (a (@ (href "/software/guix/manual/html_node/System-Installation.html")) + (a (@ (href "https://www.gnu.org/s/guix/manual/html_node/System-Installation.html")) " installation instructions") " from the manual.") (p "Alternative download methods: " diff --git a/website/www/help.scm b/website/www/help.scm index 0899ebc..bb2c2d2 100644 --- a/website/www/help.scm +++ b/website/www/help.scm @@ -1,4 +1,5 @@ (define-module (www help) + #:use-module (www utils) #:use-module (www shared) #:export (help-page)) @@ -14,43 +15,43 @@ (div (@ (class "text-center")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/guixsd-manual-icon.png") + (img (@ (src ,(img-url "guixsd-manual-icon.png")) (alt "")))) (h2 "GuixSD Manual") (p "The documentation about the Guix System Distribution is available online as part of the GNU Guix package manager manual.") - (a (@ (href "/software/guix/manual/guix.html#GNU-Distribution") + (a (@ (href "https:/www.gnu.org/s/guix/manual/guix.html#GNU-Distribution") (class "hlink-more-dark")) "Read the manual")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/guix-manual-icon.png") + (img (@ (src ,(img-url "guix-manual-icon.png")) (alt "")))) (h2 "GNU Guix Manual") (p "Documentation for the GNU Guix package manager is available online. You may also find more information about Guix by running " (em "info\xa0guix") ".") - (a (@ (href "/software/guix/manual/") + (a (@ (href "https:/www.gnu.org/software/guix/manual/") (class "hlink-more-dark")) "Read the manual")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/library-icon.png") + (img (@ (src ,(img-url "library-icon.png")) (alt "")))) (h2 "GNU Manuals") (p "GuixSD is a distribution of the " - (a (@ (href "http://www.gnu.org/")) + (a (@ (href "https://www.gnu.org/")) "GNU operating system") ". Most GNU software is documented and the documentation is available online in various formats. ") - (a (@ (href "http://www.gnu.org/doc/doc.en.html") + (a (@ (href "https://www.gnu.org/doc/doc.en.html") (class "hlink-more-dark")) "Browse the manuals")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/chat-icon.png") + (img (@ (src ,(img-url "chat-icon.png")) (alt "")))) (h2 "IRC Chat") (p "For real-time support from the community, you can @@ -65,12 +66,12 @@ browsed online. See the " (a (@ (href "https://gnunet.org/bot/log/guix/")) "channel logs") ". ") - (a (@ (href "http://webchat.freenode.net/?channels=%23guix") + (a (@ (href "https://webchat.freenode.net/?channels=%23guix") (class "hlink-more-dark")) "Connect")) (div (@ (class "summary-box")) (div (@ (class "text-center")) - (img (@ (src "/software/guix/static/base/img/email-icon.png") + (img (@ (src ,(img-url "email-icon.png")) (alt "")))) (h2 "Mailing lists") (p "Email support from the community is also available @@ -98,10 +99,10 @@ Distribution. ") (class "hlink-more-dark")) "Check all the lists"))) (h2 "Additional Documentation") - (ul (li (a (@ (href "http://arxiv.org/abs/1305.4584")) + (ul (li (a (@ (href "https://arxiv.org/abs/1305.4584")) (i "Functional Package Management with Guix")) ", presented at the " - (a (@ (href "http://www-sop.inria.fr/members/Manuel.Serrano/conferences/els13.html")) + (a (@ (href "https://www-sop.inria.fr/members/Manuel.Serrano/conferences/els13.html")) "2013 European Lisp Symposium (ELS)") ", describes the rationale, design, and implementation of Guix's packaging API. \t ")) @@ -110,24 +111,24 @@ implementation of Guix's packaging API. \t ")) (a (@ (href "https://fosdem.org/2015/schedule/event/the_emacs_of_distros/")) "FOSDEM") ": " - (a (@ (href "guix-fosdem-20150131.pdf")) + (a (@ (href ,(slides-url "guix-fosdem-20150131.pdf"))) "slides") ", " - (a (@ (href "http://audio-video.gnu.org/video/misc/2015-01__GNU_Guix__The_Emacs_of_Distros.webm")) + (a (@ (href "https://audio-video.gnu.org/video/misc/2015-01__GNU_Guix__The_Emacs_of_Distros.webm")) "video") " (WebM; 47 minutes) ") (li "August 2014, " - (a (@ (href "http://audio-video.gnu.org/video/ghm2014/")) + (a (@ (href "https://audio-video.gnu.org/video/ghm2014/")) "GNU Hackers Meeting") ": " - (a (@ (href "guix-ghm-20140815.pdf")) + (a (@ (href ,(slides-url "guix-ghm-20140815.pdf"))) "slides") ", " - (a (@ (href "http://audio-video.gnu.org/video/ghm2014/2014-08--courtes--were-building-the-gnu-system--ghm.webm")) + (a (@ (href "https://audio-video.gnu.org/video/ghm2014/2014-08--courtes--were-building-the-gnu-system--ghm.webm")) "video") " (WebM; 60 minutes) ") (li "July 2014, " - (a (@ (href "http://www.open-bio.org/wiki/Codefest_2014")) + (a (@ (href "https://www.open-bio.org/wiki/Codefest_2014")) "Open Bioinformatics Codefest 2014") ": " (a (@ (href "guix-openbio-codefest-20140709.pdf")) @@ -136,46 +137,46 @@ implementation of Guix's packaging API. \t ")) (a (@ (href "https://fosdem.org/2014/schedule/event/gnuguix/")) "FOSDEM") ": " - (a (@ (href "guix-fosdem-20140201.pdf")) + (a (@ (href ,(slides-url "guix-fosdem-20140201.pdf"))) "slides") ", " - (a (@ (href "http://video.fosdem.org/2014/H1302_Depage/Sunday/Growing_a_GNU_with_Guix.webm")) + (a (@ (href "https://video.fosdem.org/2014/H1302_Depage/Sunday/Growing_a_GNU_with_Guix.webm")) "video") " (WebM; 55 minutes) ") (li "August 2013, " - (a (@ (href "/ghm/2013/paris")) + (a (@ (href "https://www.gnu.org/s/guix/ghm/2013/paris")) "GNU Hackers Meeting") (ul (li (i "GNU Guix: Package without a scheme!") ", by Andreas: " - (a (@ (href "guix-ghm-andreas-20130823.pdf")) + (a (@ (href ,(slides-url "guix-ghm-andreas-20130823.pdf"))) "slides")) (li (i "Guix, the Computing Freedom Deployment Tool") ", by Ludovic: " - (a (@ (href "guix-ghm-ludo-20130823.pdf")) + (a (@ (href ,(slides-url "guix-ghm-ludo-20130823.pdf"))) "slides") ", " (a (@ (href "http://audio-video.gnu.org/video/ghm2013/Ludovic_Courtes-GNU_Guix_the_computing_freedom_deployment_tool_.webm")) "video") " (WebM; 60 minutes, 127MB) "))) (li "June 2013, " - (a (@ (href "http://www-sop.inria.fr/members/Manuel.Serrano/conferences/els13.html")) + (a (@ (href "https://www-sop.inria.fr/members/Manuel.Serrano/conferences/els13.html")) " European Lisp Symposium (ELS)") ": " - (a (@ (href "guix-els-20130603.pdf")) + (a (@ (href ,(slides-url "guix-els-20130603.pdf"))) "slides") ", " (a (@ (href "http://www.nicklevine.org/els2013/ludovic-courtes.mp3")) "audio")) (li "July 2012, " - (a (@ (href "/ghm/2012/ddorf/")) + (a (@ (href "https://www.gnu.org/s/guix/ghm/2012/ddorf/")) "GNU Hackers Meeting") ": " - (a (@ (href "guix-ghm-20120721.pdf")) + (a (@ (href ,(slides-url "guix-ghm-20120721.pdf"))) "slides") ", " - (a (@ (href "http://audio-video.gnu.org/video/ghm2012/guix.ogv")) + (a (@ (href "https://audio-video.gnu.org/video/ghm2012/guix.ogv")) "video") " (Ogg/" (a (@ (href "http://theora.org/")) "Theora") diff --git a/website/www/shared.scm b/website/www/shared.scm index 8d21932..5e1ddd3 100644 --- a/website/www/shared.scm +++ b/website/www/shared.scm @@ -1,5 +1,5 @@ (define-module (www shared) - #:use-module (www shared) + #:use-module (www utils) #:export (html-page-header html-page-description html-page-links @@ -24,13 +24,13 @@ GUix Package Manager, Guile Scheme, Functional package management"))) (content "width=device-width, initial-scale=1.0"))) (link (@ (type "text/css") (rel "stylesheet") - (href "/software/guix/static/base/css/base.css"))) + (href ,(css-url "base.css")))) (link (@ (type "text/css") (rel "stylesheet") - (href "/software/guix/static/base/css/index.css"))) + (href ,(css-url "index.css")))) (link (@ (type "image/png") (rel "icon") - (href "/software/guix/static/base/img/favicon.png"))) + (href ,(img-url "favicon.png")))) (link (@ (rel "license") (href "Pending..."))) (title ,(string-append title " - GuixSD")))) @@ -40,26 +40,27 @@ GUix Package Manager, Guile Scheme, Functional package management"))) "The Guix System Distribution (GuixSD) is alpha software. This means it is not production-ready. It may contain bugs and lack important features. But more than a disclaimer, this is an invitation to join us in improving it. See " - (a (@ (href "/software/guix/contribute/")) "Contributing") + (a (@ (href ,(url-base "/contribute"))) "Contributing") ", for more information. We hope you can soon switch to GuixSD without fear. ")) (define (html-page-links) `(div (@ (id "header-box")) - (a (@ (id "logo") (href "/software/guix/")) - (img (@ (src "/software/guix/static/base/img/GuixSD-logo.png") + (a (@ (id "logo") (href ,(url-base ""))) + (img (@ (src ,(img-url "GuixSD-logo.png")) (alt "GuixSD")))) (ul (@ (id "site-nav")) - (li (a (@ (href "/software/guix/download/")) "Download")) - (li (a (@ (href "/software/guix/package-list.html")) "Packages")) - (li (a (@ (href "/software/guix/help/")) "Help")) - (li (a (@ (href "/software/guix/contribute/")) "Contribute")) - (li (a (@ (href "/software/guix/donate/")) "Donate")) - (li (a (@ (href "/software/guix/about/")) "About"))))) + (li (a (@ (href ,(url-base "/download"))) "Download")) + (li (a (@ (href "https://www.gnu.org/s/guix/package-list.html")) + "Packages")) + (li (a (@ (href ,(url-base "/help"))) "Help")) + (li (a (@ (href ,(url-base "/contribute"))) "Contribute")) + (li (a (@ (href ,(url-base "/donate"))) "Donate")) + (li (a (@ (href ,(url-base "/about"))) "About"))))) (define (html-page-footer) `(div (@ (id "footer-box")) "copyleft 2015 GuixSD " - (a (@ (href "/software/guix/contribute/") (class "hlink-yellow")) + (a (@ (href ,(url-base "/contribute")) (class "hlink-yellow")) "Contributors") ". Made with " (span (@ (class "metta")) "♥") " by humans.")) diff --git a/website/www/utils.scm b/website/www/utils.scm new file mode 100644 index 0000000..9cdda4e --- /dev/null +++ b/website/www/utils.scm @@ -0,0 +1,37 @@ +(define-module (www utils) + #:export (current-url-root + resources-url-root + url-base + static-url-base + img-url + thumb-url + css-url + screenshot-url + slides-url)) + +(define current-url-root + (make-parameter "/home/mthl/src/gnu/guix-artwork/website/build")) + +(define resources-url-root + (make-parameter "https://www.gnu.org/s/guix")) + +(define (url-base location) + (string-append (current-url-root) location)) + +(define (static-url-base) + (string-append (current-url-root) "/static/base")) + +(define (img-url file) + (string-append (static-url-base) "/img/" file)) + +(define (thumb-url file) + (string-append (static-url-base) "/img/screenshots/" file)) + +(define (css-url file) + (string-append (static-url-base) "/css/" file)) + +(define (screenshot-url version file) + (string-append (resources-url-root) "/screenshots/" version "/" file)) + +(define (slides-url file) + (string-append (resources-url-root) "/" file)) -- 2.2.1