summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-10-15 22:39:40 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-10-15 22:39:40 -0400
commit128c7e685a8586fbcc3d808907c737ef8717e788 (patch)
tree05252545821d829a4dbffc6e7c61b986098f5974
parent43dc1e9dcc762be0f0e24c80f862f8425b093133 (diff)
js: Hook up navbar to routes.
* js/view/layout.js (guix.withLayout): Add click handler for 'Packages' link.
-rw-r--r--js/view/layout.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/view/layout.js b/js/view/layout.js
index aa7834b..c733a8f 100644
--- a/js/view/layout.js
+++ b/js/view/layout.js
@@ -52,7 +52,12 @@ guix.withLayout = (function() {
}, m(".container", [
m(".navbar-header", m("img.logo", { src: "/images/logo.png" })),
m("ul.nav.navbar-nav", [
- m("li.active", m("a", "Packages")),
+ m("li.active", m("a", {
+ href: "#",
+ onclick: function() {
+ m.route("/");
+ }
+ }, "Packages")),
]),
m("ul.nav.navbar-nav.navbar-right")
])),