From 576011a9c776e07ef6594c1e36ba50bebe7133c7 Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Wed, 19 Feb 2025 13:33:43 +0100 Subject: [PATCH] Remove logo from the DOM and adjust menu bar styles for improved layout --- website/script.js | 8 +++++--- website/style.css | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/website/script.js b/website/script.js index 60da581..2dc5370 100644 --- a/website/script.js +++ b/website/script.js @@ -105,8 +105,11 @@ function showCategory(category) { document.getElementById('cart').classList.add('visible'); document.querySelector('.cart-icon').classList.add('visible'); - // Hide the logo - document.querySelector('.logo').classList.add('hidden'); + // Remove the logo from the DOM + const logo = document.querySelector('.logo'); + if (logo) { + logo.remove(); + } } // Functie om de details van een item weer te geven in het modaal @@ -126,7 +129,6 @@ function showItemDetails(item) { }; document.getElementById('modal').style.display = 'block'; - document.querySelector('.menu-bar').classList.add('dark'); // Add dark class to menu-bar } // Functie om de beschrijving op te halen afhankelijk van de titel diff --git a/website/style.css b/website/style.css index 58408e1..e606a3c 100644 --- a/website/style.css +++ b/website/style.css @@ -34,10 +34,6 @@ body { flex-wrap: nowrap; /* Ensure all items are in a single row */ } -.menu-bar.dark { - background-color: #ff8c00; /* Darker background color when modal is open */ -} - .menu-item { background-color: #ff8c00; padding: 10px 20px; @@ -64,6 +60,10 @@ body { margin-top: 60px; /* Add margin to ensure it starts below the top bar */ } +.menu-bar.top + .product-display { + margin-top: 120px; /* Adjust margin when the menu bar is at the top */ +} + .product-box { width: 200px; /* Keep the width fixed */ margin: 10px;