summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-10-15 21:13:01 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-10-15 21:13:01 -0400
commit9b0ba5d668a20fc02bd28453395db9ed3fad3cf2 (patch)
treed6c73ef67d0c24efb8fd80ab8ae18f4eef7796c4 /js
parent02251331ae3c67a31624ed84460444914b688a3e (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 'js')
-rw-r--r--js/view/layout.js51
1 files changed, 38 insertions, 13 deletions
diff --git a/js/view/layout.js b/js/view/layout.js
index 310c6c9..1ff641a 100644
--- a/js/view/layout.js
+++ b/js/view/layout.js
@@ -17,17 +17,42 @@
var guix = guix || {};
-guix.withLayout = function(elem) {
- return [
- m("nav.navbar.navbar-default.navbar-static-top", {
- role: "navigation"
- }, m(".container", [
- m(".navbar-header", m("img.logo", { src: "/images/logo.png" })),
- m("ul.nav.navbar-nav", [
- m("li.active", m("a", "Packages")),
+guix.withLayout = (function() {
+ var footer = m("footer", m("small.text-center", [
+ m("p", "Copyright 2014 guix-web contributors"),
+ m("ul.list-inline", [
+ m("li", [
+ "Guix-web is licensed under the ",
+ m("a", {
+ href: "http://www.gnu.org/licenses/agpl-3.0.html"
+ }, "GNU Affero General Public License version 3 or later")
]),
- m("ul.nav.navbar-nav.navbar-right")
- ])),
- m(".container", elem)
- ];
-};
+ m("li", [
+ m("a", {
+ href: "https://getbootstrap.com"
+ }, "Bootstrap CSS"),
+ " is licensed under the ",
+ m("a", {
+ href: "https://directory.fsf.org/wiki/License:Apache2.0"
+ }, "Apache 2.0 license")
+ ]),
+ m("li",
+ m("a", { href: "/librejs" }, "JavaScript license information"))
+ ])
+ ]));
+
+ return function(elem) {
+ return [
+ m("nav.navbar.navbar-default.navbar-static-top", {
+ role: "navigation"
+ }, m(".container", [
+ m(".navbar-header", m("img.logo", { src: "/images/logo.png" })),
+ m("ul.nav.navbar-nav", [
+ m("li.active", m("a", "Packages")),
+ ]),
+ m("ul.nav.navbar-nav.navbar-right")
+ ])),
+ m(".container", elem.concat([footer]))
+ ];
+ };
+})();