From c5c3505cbeaae832c0bc42c0583d77fc2bff8b37 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 23 Nov 2024 09:37:00 +0200 Subject: Refactored menu with ak-generator, fixed mobile view --- src/js/app.js | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'src/js/app.js') diff --git a/src/js/app.js b/src/js/app.js index 06ba891..b84be92 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -15,22 +15,19 @@ body.height = window.innerHeight; pageLayout.width = window.innerWidth; pageLayout.height = window.innerHeight; mainContainer.style.display = 'block'; -window.innerWidth <= 770 ? isMobile = true : isMobile = false; -isMobile ? doubleFloorMenu.style.display = 'none':doubleFloorMenu.style.display = 'flex'; +window.innerWidth <= 850 ? isMobile = true : isMobile = false; + function onWindowResize() { body.width = window.innerWidth; body.height = window.innerHeight; pageLayout.width = window.innerWidth; pageLayout.height = window.innerHeight; - window.innerWidth <= 770 ? isMobile = true : isMobile = false; + window.innerWidth <= 850 ? isMobile = true : isMobile = false; isMobile ? doubleFloorMenu.style.display = 'none':doubleFloorMenu.style.display = 'flex'; } window.addEventListener('resize', onWindowResize, false); -// And call -menuinit(); -locationHashOnChange(); progressPlaceholder.value = '0'; @@ -60,20 +57,22 @@ var scripts = [ { element:"script", src:"./js/ui/mainLayout.js" - }, - { - element:"script", - src:"./js/page-navigation.js" - }, - { - element:"script", - src:"./js/page-projects.js" - }, - { - element:"script", - src:"./js/menu.js" } ]; +//, +// { +// element:"script", +// src:"./js/page-navigation.js" +// }, +// { +// element:"script", +// src:"./js/page-projects.js" +// }, +// { +// element:"script", +// src:"./js/menu.js" +// } +//]; for ( var i = 0; i < scripts.length; i++ ) { -- cgit v1.2.3