From b3e2a398c3d40f9c5bdbf32d96a60635f88ecad8 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 19 Dec 2017 16:37:34 -0500 Subject: [PATCH] Pull the updated nav into the non-vue version of the site --- gulpfile.js | 1 + resources/assets/js/app.js | 2 ++ resources/assets/js/nav.js | 6 +++++ resources/views/sections/nav.blade.php | 34 +++++++++++++------------- 4 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 resources/assets/js/nav.js diff --git a/gulpfile.js b/gulpfile.js index 000d4a2..29ecec2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -36,6 +36,7 @@ const vuePublic = "resources/assets/js/app-vue.js"; // Javascript files for the public site const jsPublic = [ "resources/assets/js/site-vars.js", + "resources/assets/js/nav.js", "resources/assets/js/contact.js", "resources/assets/js/subscription.js", "resources/assets/js/app.js" diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 2040c04..1ab70a2 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -1,5 +1,7 @@ // run once the document is ready $(document).ready(function() { + navInit(); + switch (SiteVars.page) { case "": subscriptionFormInit(); diff --git a/resources/assets/js/nav.js b/resources/assets/js/nav.js new file mode 100644 index 0000000..c56bf51 --- /dev/null +++ b/resources/assets/js/nav.js @@ -0,0 +1,6 @@ +// nav functionality +function navInit() { + $(".nav-section-component-mobile-header-toggle").on("click", function() { + $(".nav-section-component-mobile-header-toggle, .nav-section-component-links").toggleClass("open"); + }); +} diff --git a/resources/views/sections/nav.blade.php b/resources/views/sections/nav.blade.php index 5401a2e..7b6b33e 100644 --- a/resources/views/sections/nav.blade.php +++ b/resources/views/sections/nav.blade.php @@ -1,21 +1,21 @@ -