diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 00:50:15 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 00:50:15 +0200 |
| commit | 0b854ecccfe7832ba9a837605822a103fd9d8bc0 (patch) | |
| tree | d4a11b5677ff96618d29b114e43d25a334f66412 /public/assets/js/lib/nav | |
| parent | fbbb3a348018081bb2a89439eb3275153105d2e0 (diff) | |
clearing out old code
Diffstat (limited to 'public/assets/js/lib/nav')
| -rw-r--r-- | public/assets/js/lib/nav/DesktopNav.js | 49 | ||||
| -rw-r--r-- | public/assets/js/lib/nav/MobileNav.js | 32 |
2 files changed, 0 insertions, 81 deletions
diff --git a/public/assets/js/lib/nav/DesktopNav.js b/public/assets/js/lib/nav/DesktopNav.js deleted file mode 100644 index 0503b4a..0000000 --- a/public/assets/js/lib/nav/DesktopNav.js +++ /dev/null @@ -1,49 +0,0 @@ -var NavView = View.extend({ - - el: "#mobile-nav", - - events: { - "click .pages a": "go", - "click .pages > span": "go_span", - }, - - initialize: function(){ - }, - - home: function(){ - app.router.go("/") - this.$headings.find(".active").removeClass("active") - if (app.mobile_nav && app.mobile_nav.state.open) { - app.mobile_nav.hamburger() - } - }, - - go: function(e){ - e.preventDefault() - e.stopPropagation() - var href = $(e.currentTarget).attr("href") - app.router.go(href) - console.log(href) - if (is_mobile) { - app.mobile_nav.hamburger() - } - this.after_go() - }, - - go_span: function(e){ - $("a", e.currentTarget).trigger("click") - }, - - after_go: function(){ - }, - - setActive: function(id){ - var href = '/' + id - var $el = $('[href="' + href + '"]') - this.$('.active').removeClass('active') - if ($el.length) { - $el.addClass('active') - } - }, - -}); diff --git a/public/assets/js/lib/nav/MobileNav.js b/public/assets/js/lib/nav/MobileNav.js deleted file mode 100644 index 5c0f253..0000000 --- a/public/assets/js/lib/nav/MobileNav.js +++ /dev/null @@ -1,32 +0,0 @@ -var MobileNav = View.extend({ - - el: '#mobile_nav', - - events: { - 'touchstart .logo': 'home', - 'touchstart .hamburger': 'hamburger' - }, - - initialize: function(options){ - options = options || {} - this.state = { - open: false - } - }, - - home: function (){ - app.nav.home() - }, - - hamburger: function (e){ - $('html').toggleClass('navopen') - app.mobile_nav.state.open = ! app.mobile_nav.state.open - if (app.mobile_nav.state.open) { - $("#rapper").on("click", app.mobile_nav.hamburger) - } - else { - $("#rapper").off("click", app.mobile_nav.hamburger) - } - }, - -}) |
