From 0299359a0f3c20e2f957766e3f37706895c15afd Mon Sep 17 00:00:00 2001 From: Richard Bergsma Date: Thu, 6 Nov 2025 12:34:23 +0100 Subject: [PATCH] Remove unused favicon.svg and enhance language dropdown initialization and event listener management - Deleted the unused favicon.svg file to clean up the assets. - Improved the LanguageDropdown component by preventing multiple initializations and ensuring proper cleanup of old event listeners to enhance performance and user experience. - Updated BasicScripts to handle event listener removal more gracefully, preventing errors if elements are no longer in the DOM. --- src/assets/favicons/favicon.svg | 9 ---- src/components/LanguageDropdown.astro | 62 +++++++++++++++++++++--- src/components/common/BasicScripts.astro | 11 ++++- 3 files changed, 64 insertions(+), 18 deletions(-) delete mode 100644 src/assets/favicons/favicon.svg diff --git a/src/assets/favicons/favicon.svg b/src/assets/favicons/favicon.svg deleted file mode 100644 index 9e33460..0000000 --- a/src/assets/favicons/favicon.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/components/LanguageDropdown.astro b/src/components/LanguageDropdown.astro index 0e9595f..8e2f43f 100644 --- a/src/components/LanguageDropdown.astro +++ b/src/components/LanguageDropdown.astro @@ -147,6 +147,15 @@ const currentLanguage = languages.find((lang) => lang.code === currentLang) || l