From 13c0f9e58a7201657111ae25a7f4135e7ea74d55 Mon Sep 17 00:00:00 2001 From: BenjaminToby <52448020+BenjaminToby@users.noreply.github.com> Date: Mon, 7 Jun 2021 07:08:45 +0100 Subject: [PATCH] more mobile refinements --- scripts/v2.js | 6 +++++- v2.css | 4 ++++ v2.html | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/v2.js b/scripts/v2.js index 91e6d53..02ab565 100644 --- a/scripts/v2.js +++ b/scripts/v2.js @@ -155,6 +155,7 @@ sectionOneIo.observe(translate[4]); //############################################################################## -- Hamburger document.querySelector(".hamburger-wrapper").addEventListener("click", hamburgerMenuToggle); +var logo = document.querySelector("header > a"); let hc = 0; @@ -162,9 +163,12 @@ function hamburgerMenuToggle() { if (hc == 0) { document.querySelector("nav").className = "nav-mobile"; document.querySelector("#aside-heder-block").className = "aside-header-mobile"; + logo.style.color = "#222"; + document.querySelector(".aside-header-mobile > a:first-child").style.color = "#222"; } else { document.querySelector("nav").className = "none"; document.querySelector("#aside-heder-block").className = "aside-header"; + logo.style.color = "inherit"; hc = -1; } hc++; @@ -172,7 +176,7 @@ function hamburgerMenuToggle() { window.addEventListener("resize", () => { - if(window.innerWidth > 800) { + if(window.innerWidth > 1200) { document.querySelector("nav").className = "none"; document.querySelector("#aside-heder-block").className = "aside-header"; hc = 0; diff --git a/v2.css b/v2.css index 0c9bbc2..2f0cb44 100644 --- a/v2.css +++ b/v2.css @@ -892,6 +892,10 @@ input:focus { text-align: center; } + .aside-header-mobile > a:first-child { + color: #222; + } + .hamburger-wrapper { display: flex; } diff --git a/v2.html b/v2.html index 3f87968..d47a5aa 100644 --- a/v2.html +++ b/v2.html @@ -56,7 +56,7 @@ - +