From 2b1a0fe04d95697092fd7b04dd74e74f7aa1a5b9 Mon Sep 17 00:00:00 2001 From: Kebo Date: Fri, 24 Jan 2025 11:25:02 -0600 Subject: [PATCH] feat: journal 01-22-25 + misc. fixes --- src/components/Icon.astro | 3 +- src/components/mdx/MDXAccordion.astro | 4 +- src/components/mdx/MDXLink.astro | 2 +- src/pages/index.astro | 16 +--- src/pages/journal.mdx | 114 +++++++++++++++----------- 5 files changed, 74 insertions(+), 65 deletions(-) diff --git a/src/components/Icon.astro b/src/components/Icon.astro index 5bf2a38..42a5438 100644 --- a/src/components/Icon.astro +++ b/src/components/Icon.astro @@ -5,7 +5,8 @@ import { parse } from 'node-html-parser'; // https://ellodave.dev/blog/article/using-svgs-as-astro-components-and-inline-css/ export interface Props { - icon: string + icon: string, + class: string, } function getSVG(name: string) { diff --git a/src/components/mdx/MDXAccordion.astro b/src/components/mdx/MDXAccordion.astro index 22228ed..c4d1a73 100644 --- a/src/components/mdx/MDXAccordion.astro +++ b/src/components/mdx/MDXAccordion.astro @@ -97,7 +97,7 @@ import HR from "../HR.astro"; button.addEventListener("click", (event) => { if (!menu.classList.contains("active")) { // if closed, stop having it be closed! menu.classList.add("active"); - button.setAttribute("aria-expanded", true); + button.setAttribute("aria-expanded", "true"); // we need to set the max height to the height of the accordion object so the animations work correctly content.classList.remove("hidden"); @@ -105,7 +105,7 @@ import HR from "../HR.astro"; chevron.classList.add("rotate-180"); } else { // if open, stop having it be open!!!! menu.classList.remove("active"); - button.setAttribute("aria-expanded", false); + button.setAttribute("aria-expanded", "false"); content.style.maxHeight = '0px'; chevron.classList.remove("rotate-180"); diff --git a/src/components/mdx/MDXLink.astro b/src/components/mdx/MDXLink.astro index e8dbaea..c61f466 100644 --- a/src/components/mdx/MDXLink.astro +++ b/src/components/mdx/MDXLink.astro @@ -21,7 +21,7 @@ if (p.href.includes('https://') || p.href.includes('http://')) { {external ? ( <> -