diff --git a/client/src/assets/js/menu-toggle.js b/client/src/assets/js/menu-toggle.js new file mode 100644 index 0000000..e8ad1c6 --- /dev/null +++ b/client/src/assets/js/menu-toggle.js @@ -0,0 +1,8 @@ +const menuButton = document.getElementById('menu-btn') +const mobileNav = document.getElementById('mobile-nav') + +menuButton.addEventListener('click', ()=> { + menuButton.classList.toggle('menu-active') + mobileNav.classList.toggle('flex') + mobileNav.classList.toggle('hidden') +}) \ No newline at end of file diff --git a/client/src/components/navbar/Index.vue b/client/src/components/navbar/Index.vue index 87fac2c..7b6f825 100644 --- a/client/src/components/navbar/Index.vue +++ b/client/src/components/navbar/Index.vue @@ -1,19 +1,30 @@ \ No newline at end of file diff --git a/client/src/components/navbar/MobileLink.vue b/client/src/components/navbar/MobileLink.vue index 9a49da4..ca246ae 100644 --- a/client/src/components/navbar/MobileLink.vue +++ b/client/src/components/navbar/MobileLink.vue @@ -6,36 +6,39 @@ export default { components: { SvgIcon }, + methods: { + optionSelected() { + this.$emit('optionSelected') + } + }, props: [ - "path", + "svgPath", "text", "to" ] } -