From 8eafd01731e97636659c1dee503ae8e8aa25ae31 Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Thu, 20 Feb 2025 11:28:54 +0100 Subject: [PATCH] Remove language switcher and associated translations from the menu and scripts --- website/index.html | 30 ++++++++++++-------------- website/script.js | 53 ---------------------------------------------- website/style.css | 18 ---------------- 3 files changed, 14 insertions(+), 87 deletions(-) diff --git a/website/index.html b/website/index.html index d380cc4..4854264 100644 --- a/website/index.html +++ b/website/index.html @@ -18,15 +18,15 @@ @@ -38,23 +38,23 @@
-

Winkelmandje

+

Winkelmandje

Totaal: €0.00

- +
@@ -64,8 +64,6 @@ 0 - -
EN
diff --git a/website/script.js b/website/script.js index 1fa123f..29060a4 100644 --- a/website/script.js +++ b/website/script.js @@ -270,56 +270,3 @@ window.onclick = function(event) { // Initial call to updateCart to ensure the button is hidden on page load updateCart(); - -const translations = { - en: { - "Broodjes": "Sandwiches", - "Koude Dranken": "Cold Drinks", - "Warme Dranken": "Hot Drinks", - "Snacks": "Snacks", - "deserts": "Desserts", - "Deals": "Deals", - "Soepen": "Soups", - "Salades": "Salads", - "Sausjes": "Sauces", - "Winkelmandje": "Shopping Cart", - "Bestellen": "Order", - "Prijs": "Price", - "Toevoegen aan winkelmandje": "Add to Cart", - "Soep van de dag! (Allergieën? Meld het bij ons!)": "Soup of the day! (Allergies? Let us know!)", - // Add more translations as needed - }, - nl: { - "Sandwiches": "Broodjes", - "Cold Drinks": "Koude Dranken", - "Hot Drinks": "Warme Dranken", - "Snacks": "Snacks", - "Desserts": "deserts", - "Deals": "Deals", - "Soups": "Soepen", - "Salads": "Salades", - "Sauces": "Sausjes", - "Shopping Cart": "Winkelmandje", - "Order": "Bestellen", - "Price": "Prijs", - "Add to Cart": "Toevoegen aan winkelmandje", - "Soup of the day! (Allergies? Let us know!)": "Soep van de dag! (Allergieën? Meld het bij ons!)", - // Add more translations as needed - } -}; - -function switchLanguage(lang) { - document.querySelectorAll("[data-translate]").forEach(element => { - const key = element.getAttribute("data-translate"); - element.textContent = translations[lang][key] || key; - }); -} - -document.addEventListener("DOMContentLoaded", () => { - document.getElementById("language-switcher").addEventListener("click", () => { - const currentLang = document.documentElement.lang; - const newLang = currentLang === "nl" ? "en" : "nl"; - document.documentElement.lang = newLang; - switchLanguage(newLang); - }); -}); diff --git a/website/style.css b/website/style.css index 74af218..7d3e984 100644 --- a/website/style.css +++ b/website/style.css @@ -314,21 +314,3 @@ body { opacity: 0; /* Hide the logo */ visibility: hidden; /* Ensure the logo is not clickable */ } - -.language-switcher { - position: fixed; - bottom: 20px; /* Position at the bottom */ - left: 20px; /* Position at the left */ - background-color: #ff8c00; - color: white; - padding: 10px 20px; - border-radius: 25px; - cursor: pointer; - font-size: 1em; - transition: all 0.3s ease; - z-index: 1100; /* Ensure it is above other elements */ -} - -.language-switcher:hover { - background-color: #e65c00; -} \ No newline at end of file