diff --git a/dropdown.js b/dropdown.js
new file mode 100644
index 0000000..5d28b26
--- /dev/null
+++ b/dropdown.js
@@ -0,0 +1,56 @@
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
+
+/*
+ * InterstellarDevelopment website
+ * Copyright (C) 2024 interstellar_development
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+document.addEventListener("DOMContentLoaded", () => {
+ const menu = document.querySelector(".menu");
+ const burgerMenu = document.querySelector(".burger-menu");
+
+ if (!menu || !burgerMenu) {
+ console.warn("Menu or burger menu element not found. Ensure they exist in the DOM.");
+ return;
+ }
+
+ // Toggle the menu visibility
+ function toggleMenu() {
+ menu.classList.toggle("active");
+
+ if (menu.classList.contains("active")) {
+ // Add click listener to close menu when clicking outside
+ document.addEventListener("click", closeMenu);
+ } else {
+ // Remove the click listener when menu is closed
+ document.removeEventListener("click", closeMenu);
+ }
+ }
+
+ // Close the menu if clicking outside of it
+ function closeMenu(event) {
+ if (!menu.contains(event.target) && !event.target.classList.contains("burger-menu")) {
+ menu.classList.remove("active");
+ document.removeEventListener("click", closeMenu);
+ }
+ }
+
+ // Attach click event to the burger menu button
+ burgerMenu.addEventListener("click", (event) => {
+ event.stopPropagation(); // Prevent click from immediately triggering closeMenu
+ toggleMenu();
+ });
+});
+// @license-end
\ No newline at end of file
diff --git a/header.js b/header.js
index 6e16e53..3bd9f3c 100644
--- a/header.js
+++ b/header.js
@@ -17,7 +17,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-
class Header extends HTMLElement {
constructor() {
super();
@@ -25,20 +24,23 @@ class Header extends HTMLElement {
connectedCallback() {
this.innerHTML = `
-
-
Join us as we strive to create a vibrant community around free software and gaming. Together, we can make a difference and pave the way for a free future!