From 1dc422ad0512fabd11c7a7329590dd2a531bbc53 Mon Sep 17 00:00:00 2001 From: Prabhu Bisht Date: Sat, 20 Jan 2024 22:46:20 +0530 Subject: [PATCH 1/3] Fixes #291 : Hamburger menu and footer padding in contributors page --- assets/css_files/contributor.css | 2 +- assets/html_files/contributor.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css_files/contributor.css b/assets/css_files/contributor.css index ce123446..c6503c9c 100644 --- a/assets/css_files/contributor.css +++ b/assets/css_files/contributor.css @@ -63,7 +63,7 @@ body { } -@media (min-width: 1000px){ +@media (min-width: 1400px){ .footer{ position: fixed; width: 100%; diff --git a/assets/html_files/contributor.html b/assets/html_files/contributor.html index f4739b33..c0455fbc 100644 --- a/assets/html_files/contributor.html +++ b/assets/html_files/contributor.html @@ -8,6 +8,7 @@ + Contributors - Beautiify From c097834982bc2ab547297dfa5f0f952ff99dc7e7 Mon Sep 17 00:00:00 2001 From: Prabhu Bisht Date: Thu, 15 Feb 2024 16:13:06 +0530 Subject: [PATCH 2/3] Fixes #575 Search bar on mobile screen responsive now --- style.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/style.css b/style.css index de65d778..a020e7ec 100644 --- a/style.css +++ b/style.css @@ -702,8 +702,7 @@ footer p a { #searchBar { text-align: center; border-radius: 14px; - margin: 2rem 4rem 0; - padding: 2rem; + margin: 4rem 4rem 0; color: white; width: 100%; } @@ -720,7 +719,7 @@ footer p a { background: transparent; border: 0; color: rgb(57, 4, 100); - margin-left: 1rem; + margin: 1rem; background-color: rgba(224, 202, 245, 0.743); padding: .7rem; width: 8rem; @@ -746,6 +745,7 @@ footer p a { width: 40rem; transition: all linear .2s; font-weight: 600; + padding-right: 0 !important; } #searchBar input:hover { @@ -822,7 +822,7 @@ footer p a { @media (max-width: 650px) { #searchBar input { - width: 60%; + width: 100%; font-size: 1.5rem; } } From ef274ac3eb5d89aca03fe86c4c7908ca966f3bf2 Mon Sep 17 00:00:00 2001 From: Prabhu Bisht Date: Wed, 21 Feb 2024 16:53:15 +0530 Subject: [PATCH 3/3] Fixes#592 Hamburger menu working --- assets/html_files/accordions.html | 2 ++ assets/js_files/hamburgerMenu.js | 16 ++++++++++++++++ index.html | 1 + script.js | 17 ----------------- 4 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 assets/js_files/hamburgerMenu.js diff --git a/assets/html_files/accordions.html b/assets/html_files/accordions.html index b022e18f..f96109e3 100644 --- a/assets/html_files/accordions.html +++ b/assets/html_files/accordions.html @@ -11,6 +11,7 @@ + Beautiify | Accordions @@ -188,6 +189,7 @@

Simple Accordion

+ diff --git a/assets/js_files/hamburgerMenu.js b/assets/js_files/hamburgerMenu.js new file mode 100644 index 00000000..ca63e0e1 --- /dev/null +++ b/assets/js_files/hamburgerMenu.js @@ -0,0 +1,16 @@ +const hamburger = document.querySelector(".hamburger"); +const navMenu = document.querySelector(".nav-menu"); + +hamburger.addEventListener("click", mobileMenu); +function mobileMenu() { + hamburger.classList.toggle("active"); + navMenu.classList.toggle("active"); +} + +const navLink = document.querySelectorAll(".nav-link"); +navLink.forEach(n => n.addEventListener("click", closeMenu)); + +function closeMenu() { + hamburger.classList.remove("active"); + navMenu.classList.remove("active"); +} \ No newline at end of file diff --git a/index.html b/index.html index 2574f252..0fe50923 100644 --- a/index.html +++ b/index.html @@ -268,6 +268,7 @@

Transfer Lists

+ diff --git a/script.js b/script.js index b6d1b462..43a1443d 100644 --- a/script.js +++ b/script.js @@ -1,26 +1,9 @@ -const hamburger = document.querySelector(".hamburger"); -const navMenu = document.querySelector(".nav-menu"); - document.addEventListener("DOMContentLoaded", function() { setTimeout(function() { document.querySelector("body").classList.add("loaded"); }, 500) }); -hamburger.addEventListener("click", mobileMenu); -function mobileMenu() { - hamburger.classList.toggle("active"); - navMenu.classList.toggle("active"); -} - -const navLink = document.querySelectorAll(".nav-link"); -navLink.forEach(n => n.addEventListener("click", closeMenu)); - -function closeMenu() { - hamburger.classList.remove("active"); - navMenu.classList.remove("active"); -} - let calcScrollValue = () => { let scrollProg = document.getElementById("progress"); let pos = document.documentElement.scrollTop;