From 128c7e685a8586fbcc3d808907c737ef8717e788 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 15 Oct 2014 22:39:40 -0400 Subject: js: Hook up navbar to routes. * js/view/layout.js (guix.withLayout): Add click handler for 'Packages' link. --- js/view/layout.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'js/view') 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") ])), -- cgit v1.2.3