diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-10-15 21:13:01 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-10-15 21:13:01 -0400 |
commit | 9b0ba5d668a20fc02bd28453395db9ed3fad3cf2 (patch) | |
tree | d6c73ef67d0c24efb8fd80ab8ae18f4eef7796c4 /guix-web/view.scm | |
parent | 02251331ae3c67a31624ed84460444914b688a3e (diff) |
Render footer on client instead of server.
* guix-web/view.scm (main-layout): Remove footer.
(all-packages): Remove '#guix' div.
(librejs): Add container and logo.
* js/view/layout.js (guix.withLayout): Render footer.
Diffstat (limited to 'guix-web/view.scm')
-rw-r--r-- | guix-web/view.scm | 53 |
1 files changed, 17 insertions, 36 deletions
diff --git a/guix-web/view.scm b/guix-web/view.scm index f444fbb..f8fc9d9 100644 --- a/guix-web/view.scm +++ b/guix-web/view.scm @@ -64,34 +64,14 @@ (define (main-layout subtitle body) `(html (head + (meta (@ (content "text/html;charset=utf-8") + (http-equiv "Content-Type"))) (title ,(string-append "GNU Guix - " subtitle)) (link (@ (rel "stylesheet") (href "/css/bootstrap.css"))) (link (@ (rel "stylesheet") (href "/css/guix.css")))) - (body - (div (@ (class "container")) - (a (@ (href "/")) - (image (@ (src "/images/logo.png")))) - ,@body - (footer - (small - ;; FIXME: Figure out why copyright character doesn't - ;; render properly. - (p "Copyright (C) 2014 Guix-web contributors") - (p "Guix-web is licensed under the " - (a (@ (href "http://www.gnu.org/licenses/agpl-3.0.html")) - "GNU Affero General Public License (AGPL)") - " - " - (a (@ (href "https://getbootstrap.com")) - "Bootstrap CSS") - " is licensed under the " - (a (@ (href "https://directory.fsf.org/wiki/License:Apache2.0")) - "Apache 2.0 license") - " - " - (a (@ (href "/librejs") - (rel "jslicense")) - "JavaScript license information")))))))) + (body ,body))) (define (license->json license) (json @@ -151,10 +131,7 @@ (else "")))) (define (all-packages) - (main-layout - "Packages" - `((div (@ (id "guix")) "") - ,@(map script-tag javascripts)))) + (main-layout "Packages" (map script-tag javascripts))) ;; This should be moved client-side and the server should just serve ;; the relevant JSON. @@ -225,12 +202,16 @@ (main-layout "LibreJS" - `((h1 "JavaScript License Information") - (table (@ (id "jslicense-labels1") - (class "table")) - (thead - (tr - (th "URI") - (th "License") - (th "Source Code"))) - (tbody ,@(map weblabel javascripts)))))) + `(div (@ (class "container")) + (div + (a (@ (href "/")) + (img (@ (src "/images/logo.png"))))) + (h1 "JavaScript License Information") + (table (@ (id "jslicense-labels1") + (class "table")) + (thead + (tr + (th "URI") + (th "License") + (th "Source Code"))) + (tbody ,@(map weblabel javascripts)))))) |