1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
;;; GuixSD website --- GNU's advanced distro website
;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
;;; Initially written by Luis Felipe López Acevedo <felipe.lopez@openmailbox.org>
;;; who waives all copyright interest on this file.
;;;
;;; This file is part of GuixSD website.
;;;
;;; GuixSD website is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU Affero General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GuixSD website is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU Affero General Public License for more details.
;;;
;;; You should have received a copy of the GNU Affero General Public License
;;; along with GuixSD website. If not, see <http://www.gnu.org/licenses/>.
(define-module (www shared)
#:use-module (www utils)
#:export (latest-guix-version
html-page-header
html-page-description
html-page-links
html-page-footer))
(define latest-guix-version
(make-parameter "0.9.0"))
(define* (html-page-header title #:key (css "article.css") js)
`(head (meta (@ (charset "utf-8")))
(meta (@ (name "author")
(content "GuixSD Contributors")))
(meta (@ (name "description")
(content
"GuixSD is GNU's advanced system distribution. GNU is an
operating system which respects the freedom of computer users. You are free to
run the system for any purpose, study how it works, improve it, and share it
with the whole world.")))
(meta (@ (name "keywords")
(content
"GNU, FSF, Free Software Foundation, Linux, Emacs, GCC,
Unix, Free Software, Libre Software, Operating System, GNU Kernel, GNU Hurd,
Guix Package Manager, Guile Scheme, Transactional upgrades,
Functional package management,")))
(meta (@ (name "viewport")
(content "width=device-width, initial-scale=1.0")))
(link (@ (type "text/css")
(rel "stylesheet")
(href ,(css-url "base.css"))))
(link (@ (type "text/css")
(rel "stylesheet")
(href ,(css-url css))))
(link (@ (type "image/png")
(rel "icon")
(href ,(image-url "favicon.png"))))
(link (@ (rel "license") (href "Pending...")))
(title ,(string-append title " — GuixSD"))
,(if js `(script (@ (src ,(js-url js))) "") "")))
(define (html-page-description)
`(div
(div (@ (class "message-box msg-info"))
(span (@ (class "msg-label")) "Note ")
"The Guix System Distribution (GuixSD) is beta software, "
"which means it is "
(a (@ (href ,(base-url "manual/html_node/System-Installation.html#Limitations")))
"not production-ready")
". But you can "
(a (@ (href ,(base-url "contribute"))) "help") "!")
(div (@ (class "message-box donate-info"))
(span (@ (class "msg-label")) "Donate ")
"For Guix to grow we need to upgrade our hardware. Please consider "
(a (@ (href "https://my.fsf.org/civicrm/contribute/transact?reset=1&id=50")
(class "donate-button")) "donating") "!")))
(define (html-page-links)
`(div (@ (id "header-box"))
(a (@ (id "logo") (href ,(base-url "")))
(img (@ (src ,(image-url "GuixSD-logo.png"))
(alt "GuixSD"))))
(ul (@ (id "site-nav"))
(li (a (@ (href ,(base-url "download"))) "Download"))
;; Note: valid only if `packages-page' is exported.
(li (a (@ (href ,(base-url "packages"))) "Packages"))
(li (a (@ (href ,(base-url "help"))) "Help"))
(li (a (@ (href ,(base-url "contribute"))) "Contribute"))
(li (a (@ (href ,(base-url "donate"))) "Donate"))
(li (a (@ (href ,(base-url "about"))) "About")))))
(define (html-page-footer)
`(div (@ (id "footer-box"))
"Made with " (span (@ (class "metta")) "♥")
" by humans and powered by "
(a (@ (href ,(gnu-url "software/guile")) (class "hlink-yellow"))
"GNU Guile") ". "
(a (@ (href "http://git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website")
(class "hlink-yellow"))
"Source code")
" under the "
(a (@ (href ,(gnu-url "licenses/agpl-3.0.html")) (class "hlink-yellow"))
"GNU AGPL") "."))
|