From 4b5f65bfdd1c7d511ade96ba6157101b38f6c09e Mon Sep 17 00:00:00 2001 From: Corwin Perren Date: Fri, 5 Dec 2025 14:17:12 -0800 Subject: [PATCH] Removed unused build, refactored H1-3 to use slot based setup, added visual and aria page highlighting for navbar links, switched all pages to use custom H1-3, better new page/tab handling for inline links --- .gitea/disabled_workflows/playwright.yml | 27 --- src/components/CustomHtmlWrappers/H2.astro | 5 - src/components/CustomHtmlWrappers/H3.astro | 5 - src/components/H1.astro | 5 + src/components/H2.astro | 5 + src/components/H3.astro | 5 + src/components/InlineLink.astro | 22 ++- src/components/NestedNavbarEntries.astro | 35 +++- src/interfaces/components.ts | 3 + src/layouts/BaseLayout.astro | 45 ++--- src/pages/education.astro | 24 ++- .../leconte-glacier-deployments.astro | 14 +- ...obotic-oceanographic-surface-sampler.astro | 14 +- src/pages/hobby/body-mods.astro | 82 ++++----- src/pages/hobby/motorcycling/lineup.astro | 19 ++- src/pages/index.astro | 156 +++++++++--------- .../2019-07-01-hardware-test-engineer.astro | 3 +- .../2025-11-10-infrastructure-engineer.astro | 3 +- 18 files changed, 248 insertions(+), 224 deletions(-) delete mode 100644 .gitea/disabled_workflows/playwright.yml delete mode 100644 src/components/CustomHtmlWrappers/H2.astro delete mode 100644 src/components/CustomHtmlWrappers/H3.astro create mode 100644 src/components/H1.astro create mode 100644 src/components/H2.astro create mode 100644 src/components/H3.astro create mode 100644 src/interfaces/components.ts diff --git a/.gitea/disabled_workflows/playwright.yml b/.gitea/disabled_workflows/playwright.yml deleted file mode 100644 index 2812391..0000000 --- a/.gitea/disabled_workflows/playwright.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Playwright Tests -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/src/components/CustomHtmlWrappers/H2.astro b/src/components/CustomHtmlWrappers/H2.astro deleted file mode 100644 index 5b2688e..0000000 --- a/src/components/CustomHtmlWrappers/H2.astro +++ /dev/null @@ -1,5 +0,0 @@ ---- - ---- - -

{Astro.props.text}

diff --git a/src/components/CustomHtmlWrappers/H3.astro b/src/components/CustomHtmlWrappers/H3.astro deleted file mode 100644 index 49affef..0000000 --- a/src/components/CustomHtmlWrappers/H3.astro +++ /dev/null @@ -1,5 +0,0 @@ ---- - ---- - -

{Astro.props.text}

diff --git a/src/components/H1.astro b/src/components/H1.astro new file mode 100644 index 0000000..6778a2c --- /dev/null +++ b/src/components/H1.astro @@ -0,0 +1,5 @@ +--- + +--- + +

diff --git a/src/components/H2.astro b/src/components/H2.astro new file mode 100644 index 0000000..d31b002 --- /dev/null +++ b/src/components/H2.astro @@ -0,0 +1,5 @@ +--- + +--- + +

diff --git a/src/components/H3.astro b/src/components/H3.astro new file mode 100644 index 0000000..5933837 --- /dev/null +++ b/src/components/H3.astro @@ -0,0 +1,5 @@ +--- + +--- + +

diff --git a/src/components/InlineLink.astro b/src/components/InlineLink.astro index c3cc47b..a302e00 100644 --- a/src/components/InlineLink.astro +++ b/src/components/InlineLink.astro @@ -1,14 +1,30 @@ --- -interface Props { +import type { ComponentPropsBase } from "@interfaces/components.ts"; + +interface Props extends ComponentPropsBase { href: string; target?: string; } -const { href, target = "_blank" } = Astro.props; +const { class: className, href, target } = Astro.props; + +let finalTarget: string | undefined = target; + +if (target === undefined) { + if (href.startsWith("/")) { + finalTarget = ""; + } else { + finalTarget = "_blank"; + } +} --- <> - + diff --git a/src/components/NestedNavbarEntries.astro b/src/components/NestedNavbarEntries.astro index dac0cae..300370b 100644 --- a/src/components/NestedNavbarEntries.astro +++ b/src/components/NestedNavbarEntries.astro @@ -14,6 +14,8 @@ const getHrefPath = (entry: navLink): string => { : "/" + (paths && paths.length ? [...paths, entry.path].join("/") : entry.path); }; + +const { pathname } = Astro.url; ---