From d25d8dbb758640984f21bcfe42dcbf47d797ad88 Mon Sep 17 00:00:00 2001 From: theamazing0 Date: Sun, 3 Aug 2025 18:28:33 -0400 Subject: [PATCH] Configured project to work with ClientRouter --- package.json | 2 +- src/components/EncryptedContactView.astro | 13 +++++++++---- src/layouts/BaseLayout.astro | 6 ++---- src/pages/now.md | 5 +++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 372a1e5..da454f9 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "mini-site", + "name": "website", "type": "module", "version": "0.0.1", "scripts": { diff --git a/src/components/EncryptedContactView.astro b/src/components/EncryptedContactView.astro index 5bccfa9..89777e6 100644 --- a/src/components/EncryptedContactView.astro +++ b/src/components/EncryptedContactView.astro @@ -165,6 +165,8 @@ function encryptString(input: string, difficultyPrefix = "0000") { async function decryptData(e: Event) { e.preventDefault(); + console.log("decrypting data"); + const detailsDiv = document.getElementById("details-div"); if (detailsDiv) { const encryptedDetails = detailsDiv.dataset.encrypted; @@ -229,8 +231,11 @@ function encryptString(input: string, difficultyPrefix = "0000") { } } - const decodeBtn = document.getElementById("decode-btn"); - if (decodeBtn) { - decodeBtn.addEventListener("click", decryptData); - } + document.addEventListener("astro:page-load", () => { + const decodeBtn = document.getElementById("decode-btn"); + if (decodeBtn) { + decodeBtn.addEventListener("click", decryptData); + console.log("Adding eventlistener"); + } + }); diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index a5d6eb8..ee47d07 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -9,7 +9,7 @@ import NavItem from "../components/NavItem.astro"; import Navbar from "../components/Navbar.astro"; import "@fontsource-variable/inter"; import interWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2"; -// import { ClientRouter } from "astro:transitions"; +import { ClientRouter } from "astro:transitions"; --- @@ -33,7 +33,7 @@ import interWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal crossorigin="anonymous" /> - + {title}
@@ -114,6 +114,4 @@ import interWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal } } - - diff --git a/src/pages/now.md b/src/pages/now.md index 851d53d..2ccca23 100644 --- a/src/pages/now.md +++ b/src/pages/now.md @@ -7,5 +7,6 @@ title: Now _Last updated Jul 28, 2025_ -- I've been working on this personal website. I'm planning on submitting it to [Summer of Making](https://summer.hackclub.com/) to hopefully get a free domain for it. -- Getting ready to start 11th grade in a week. I'm sort of looking forward to meeting with my friends more often again, but this summer has also been pretty fun. +- 🖥️ I've been working on this personal website. I'm planning on submitting it to [Summer of Making](https://summer.hackclub.com/) to hopefully get a free domain for it. +- 📚 Getting ready to start 11th grade in a week. I'm sort of looking forward to meeting with my friends more often again, but this summer has also been pretty fun. +- 🌼 My [native plants](https://gnps.org/georgias-native-plants/) that I started growing from seed this year seem to be doing well. The Wild Bergamots are doing very good and haven't been bothered by any animals even before I put some chicken wire up. The rest have suffered some damage from eating, but are still growing back.