@@ -37,6 +35,7 @@ import Icon from '../Icon.astro';
id='show-mobile-navigation'
class='text-gray-400 hover:text-gray-50 block sm:hidden cursor-pointer'
aria-label='Menu'
+ onclick="document.getElementById('mobile-navigation').classList.remove('hidden');"
>
@@ -44,11 +43,13 @@ import Icon from '../Icon.astro';
diff --git a/src/components/Navigation/navigation.js b/src/components/Navigation/navigation.js
deleted file mode 100644
index 63e510d7a..000000000
--- a/src/components/Navigation/navigation.js
+++ /dev/null
@@ -1,46 +0,0 @@
-class Navigation {
- constructor() {
- this.showNavigationId = 'show-mobile-navigation';
- this.navigationId = 'mobile-navigation';
- this.closeNavigationId = 'close-mobile-navigation';
-
- this.init = this.init.bind(this);
- this.onDOMLoaded = this.onDOMLoaded.bind(this);
- this.showNavigation = this.showNavigation.bind(this);
- this.closeNavigation = this.closeNavigation.bind(this);
- }
-
- get showNavigationEl() {
- return document.getElementById(this.showNavigationId);
- }
-
- get navigationEl() {
- return document.getElementById(this.navigationId);
- }
-
- get closeNavigationEl() {
- return document.getElementById(this.closeNavigationId);
- }
-
- showNavigation() {
- this.navigationEl.classList.remove('hidden');
- this.navigationEl.classList.add('flex');
- }
-
- closeNavigation() {
- this.navigationEl.classList.add('hidden');
- this.navigationEl.classList.remove('flex');
- }
-
- onDOMLoaded() {
- this.showNavigationEl.addEventListener('click', this.showNavigation);
- this.closeNavigationEl.addEventListener('click', this.closeNavigation);
- }
-
- init() {
- window.addEventListener('DOMContentLoaded', this.onDOMLoaded);
- }
-}
-
-const navigation = new Navigation();
-navigation.init();
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
index 6d9aaf269..23bc3fb61 100644
--- a/src/layouts/BaseLayout.astro
+++ b/src/layouts/BaseLayout.astro
@@ -1,6 +1,6 @@
---
import '../styles/global.css';
-import Navigation from '../components/Navigation/Navigation.astro';
+import Navigation from '../components/Navigation.astro';
import OpenSourceBanner from '../components/OpenSourceBanner.astro';
import Footer from '../components/Footer.astro';
import type { SponsorType } from '../components/Sponsor/Sponsor.astro';