From 2b7380ba57c4d404f37da7db340c00ecac2f9a2a Mon Sep 17 00:00:00 2001
From: rift <117926989+Riftriot@users.noreply.github.com>
Date: Tue, 23 Jul 2024 20:07:55 -0500
Subject: [PATCH] broken header shit
---
src/components/Header.astro | 9 +-
src/components/HeaderButton.astro | 8 +-
src/components/MobileNavigation.astro | 6 +-
src/components/debug.astro | 103 ++++++++++++++++++++++
src/layouts/Layout.astro | 120 +++++++++++++-------------
5 files changed, 182 insertions(+), 64 deletions(-)
create mode 100644 src/components/debug.astro
diff --git a/src/components/Header.astro b/src/components/Header.astro
index 92fe606..4e0b92a 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -15,7 +15,7 @@ const t = useTranslations(lang);
{/* Typical desktop menu */}
-
+
{
+ if (mobileNavTrigger) {
+ const mobileNavTrigger = document.getElementById("mobileNavTrigger")!;
+ mobileNavTrigger.addEventListener("click", openDialog);
+ }
+ });
diff --git a/src/components/HeaderButton.astro b/src/components/HeaderButton.astro
index b72ecfc..4525ab9 100644
--- a/src/components/HeaderButton.astro
+++ b/src/components/HeaderButton.astro
@@ -1,9 +1,11 @@
---
-const { text, icon } = Astro.props;
+const { text, route } = Astro.props;
---
-
+
diff --git a/src/components/MobileNavigation.astro b/src/components/MobileNavigation.astro
index ea43403..16531c4 100644
--- a/src/components/MobileNavigation.astro
+++ b/src/components/MobileNavigation.astro
@@ -8,8 +8,9 @@ const t = useTranslations(lang);
+
diff --git a/src/components/debug.astro b/src/components/debug.astro
new file mode 100644
index 0000000..abf5bf5
--- /dev/null
+++ b/src/components/debug.astro
@@ -0,0 +1,103 @@
+---
+import { getLangFromUrl, useTranslations } from "../i18n/utils";
+import { isMobileNavOpen } from "../store.js";
+import Logo from "./Logo.astro";
+import HeaderButton from "./HeaderButton.astro";
+import { Icon } from "astro-icon/components";
+const lang = getLangFromUrl(Astro.url);
+const t = useTranslations(lang);
+---
+
+
+
+ {/* Typical desktop menu */}
+
+
+
+ {
+ /* Astro won't let us pass the icon as a prop so it's going into the outlet here. */
+ }
+
+
+
+
+
+
+
+
+ {/* Mobile hamburger menu */}
+
+
+
+
+
+
+
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 9e5e20b..ddc1de8 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -1,5 +1,6 @@
---
import Header from "../components/Header.astro";
+import { ViewTransitions } from "astro:transitions";
import "../themes/nebula.css";
import MobileNavigation from "../components/MobileNavigation.astro";
@@ -19,8 +20,9 @@ const { title } = Astro.props;
{title}
+
-
+
+
+
+
+
-
-
-
-