From 2a9dfc2716d5bd26a6fa5fa5296abff680b9aa1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cain=C3=A3=20Milech?= Date: Wed, 7 Dec 2022 18:26:26 -0300 Subject: [PATCH] feat: adiciona js de funcionamento so do menu mobile --- src/arquivos/js/app/partials/Menu.js | 8 +- src/controles-customizados/menuPrincipal.html | 108 ++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) diff --git a/src/arquivos/js/app/partials/Menu.js b/src/arquivos/js/app/partials/Menu.js index 74d8e04..5199aff 100644 --- a/src/arquivos/js/app/partials/Menu.js +++ b/src/arquivos/js/app/partials/Menu.js @@ -1,3 +1,5 @@ +import { isSmallerThen991 } from "Helpers/MediasMatch"; + export default class Menu { constructor() { this.selectors(); @@ -15,8 +17,12 @@ export default class Menu { events() { this.openMenuButton.click(this.openMenu.bind(this)); this.closeMenuButton.click(this.closeMenu.bind(this)); - this.departmentLink.click(this.openSubmenu.bind(this)); + this.returnButton.click(this.closeSubmenu.bind(this)); + + if (isSmallerThen991) { + this.departmentLink.click(this.openSubmenu.bind(this)); + } } openMenu() { diff --git a/src/controles-customizados/menuPrincipal.html b/src/controles-customizados/menuPrincipal.html index 913f3f0..7beb010 100644 --- a/src/controles-customizados/menuPrincipal.html +++ b/src/controles-customizados/menuPrincipal.html @@ -79,12 +79,120 @@ LOREM IPSUM + +