From f2215b36f3e1844ac058e7e7cfef6a53083efef9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 24 Sep 2015 11:58:36 -0400 Subject: nav view --- public/assets/js/index.js | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'public/assets/js/index.js') diff --git a/public/assets/js/index.js b/public/assets/js/index.js index 2e5ac92..fefb7fc 100644 --- a/public/assets/js/index.js +++ b/public/assets/js/index.js @@ -1,13 +1,13 @@ var app = (function(){ var app = {} + var id = -1 + app.init = function(){ - app.router = new SiteRouter () - app.view = null + app.view = new NavView () $(window).on("focus", app.focus) $(window).on("blur", app.blur) - $(window).on("keydown", app.keydown) } app.focused = true @@ -20,24 +20,7 @@ var app = (function(){ app.blur = function(){ app.focused = false } - - app.keydown = function(e){ - switch (e.keyCode) { - case 37: // left - // prev - break - case 39: // right - // next - break - case 38: // up - // home - break - case 40: // down - // random - break - } - } - + document.addEventListener('DOMContentLoaded', app.init) return app -- cgit v1.2.3-70-g09d2