From c9f921ba5bdd722e55b9e8476c987120840f5bb8 Mon Sep 17 00:00:00 2001 From: Corwin Perren Date: Tue, 11 Nov 2025 15:16:15 -0800 Subject: [PATCH] Fixed weird floating footer behavior, updated Timeline to handle new growing scrolling content div, fixed grammar issue on chubby buttons, removed used nginx configs and Dockerfile comments, made Table not go full-w automatically, added tests to ensure no orphaned astro pages or site layout entries exist, dummy sitemap index so code analysis doesn't freak out --- Dockerfile | 6 +--- astro.config.mjs | 8 ++++- entrypoint.sh | 14 -------- nginx/nginx.conf | 6 ---- src/components/Footer.astro | 2 +- src/components/Table.astro | 2 +- src/components/Timeline/Timeline.astro | 1 - src/components/Timeline/timeline.ts | 24 +++++++------- src/data/site-layout.ts | 7 ++-- src/layouts/BaseLayout.astro | 23 +++++++------ .../chubby-buttons-2-mount.astro | 3 +- src/pages/index.astro | 2 +- src/pages/sitemap-index.xml | 5 +++ ...navigable.spec.ts => static-pages.spec.ts} | 1 - test/components/navbar.spec.ts | 15 --------- test/endpoints.spec.ts | 32 +++++++++++++++++++ vitest.config.ts | 3 +- 17 files changed, 78 insertions(+), 76 deletions(-) delete mode 100755 entrypoint.sh create mode 100644 src/pages/sitemap-index.xml rename test-e2e/{all-site-layout-pages-navigable.spec.ts => static-pages.spec.ts} (91%) delete mode 100644 test/components/navbar.spec.ts create mode 100644 test/endpoints.spec.ts diff --git a/Dockerfile b/Dockerfile index 69fbe83..115becf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,4 @@ COPY --from=build /app/dist /usr/share/nginx/html RUN chown -R nginx:nginx /usr/share/nginx/html -#COPY entrypoint.sh /entrypoint.sh - -EXPOSE 80 - -#ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file +EXPOSE 80 \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index c0fb8ba..bd47dd1 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -3,11 +3,14 @@ import {defineConfig} from 'astro/config'; import sitemap from "@astrojs/sitemap"; import tailwindcss from "@tailwindcss/vite"; +// We don't have access to short imports this early in the build chain +// noinspection ES6PreferShortImport import {siteLayout, getPaths} from "./src/data/site-layout.ts"; const disabledPaths = getPaths(siteLayout, [], true) // https://astro.build/config + export default defineConfig({ site: "https://caperren.com", prefetch: { @@ -20,6 +23,9 @@ export default defineConfig({ }) ], vite: { - plugins: [tailwindcss()], + plugins: [ + // @ts-ignore + tailwindcss() + ], }, }); \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 1aa3eac..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh -set -e - -# Generate a unique token per container launch -TOKEN="$(cat /proc/sys/kernel/random/uuid)" # or: TOKEN="$(date +%s%N)" - -# Write it into a file NGINX will include -cat >/etc/nginx/conf.d/_release_token.conf < +
{import.meta.env.PUBLIC_BUILD_ENVIRONMENT || "development"} {import.meta.env.PUBLIC_REPO_VERSION_HASH || "invalid"}
diff --git a/src/components/Table.astro b/src/components/Table.astro index b2432e4..88cf20c 100644 --- a/src/components/Table.astro +++ b/src/components/Table.astro @@ -8,7 +8,7 @@ const paddingClasses: string = `px-${columnPadding} py-${rowPadding}`; ---
- +
{data.header.map(headingText => ( diff --git a/src/components/Timeline/Timeline.astro b/src/components/Timeline/Timeline.astro index bc10cba..40d5b77 100644 --- a/src/components/Timeline/Timeline.astro +++ b/src/components/Timeline/Timeline.astro @@ -5,7 +5,6 @@ const timeline: timelineEntry[] = Astro.props.timeline || []; --- -
{timeline.map((entry, index) => ( diff --git a/src/components/Timeline/timeline.ts b/src/components/Timeline/timeline.ts index e1678f3..57095c9 100644 --- a/src/components/Timeline/timeline.ts +++ b/src/components/Timeline/timeline.ts @@ -7,7 +7,6 @@ class CustomTimeline extends HTMLElement { super(); this._eventElements = this._getNodeElements(); - window.addEventListener("load", this._paintLeaderLines); } @@ -26,17 +25,20 @@ class CustomTimeline extends HTMLElement { } }).filter(pair => pair !== undefined) + let contentBodyScrolling = document.getElementById("content-body-scrolling") + pairs.forEach(pair => { - new LeaderLine({ - start: pair[0], - end: pair[1], - color: '#10ac25', - size: 3, - startSocket: "right", - endSocket: "left", - startPlug: "square", - endPlug: "arrow3" - }); + let line = new LeaderLine({ + start: pair[0], + end: pair[1], + color: '#10ac25', + size: 3, + startSocket: "right", + endSocket: "left", + startPlug: "square", + endPlug: "arrow3" + }); + contentBodyScrolling?.addEventListener("scroll", () => line.position()) }); } } diff --git a/src/data/site-layout.ts b/src/data/site-layout.ts index 8f9b77d..a0c2b4c 100644 --- a/src/data/site-layout.ts +++ b/src/data/site-layout.ts @@ -4,22 +4,18 @@ export const siteLayout: navLink[] = [ {navText: "About", path: ""}, {navText: "Education", path: "education"}, { - enabled: false, navText: "Experiences", path: "experience", children: [ { - enabled: false, navText: "SpaceX", path: "spacex", children: [ { - enabled: false, navText: "Hardware Test Engineer I/II", path: "hardware-test-engineer-i-ii" }, { - enabled: false, navText: "Avionics Test Engineering Internship", path: "avionics-test-engineering-internship" } @@ -151,8 +147,9 @@ export const siteLayout: navLink[] = [ navText: "Projects", path: "projects", children: [ - {navText: "Shed Solar", path: "shed-solar", enabled: false}, {navText: "OSSM Overkill Edition", path: "ossm-overkill-edition", enabled: false}, + {navText: "Rachael Ray Light Box", path: "rachael-ray-light-box", enabled: false}, + {navText: "Shed Solar", path: "shed-solar", enabled: false}, ] }, {enabled: false, navText: "NixOS", path: "nixos"}, diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index d8d316a..98fe9fb 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -16,20 +16,23 @@ const pageEnabled = pathToMetadata(Astro.url.pathname).enabled ?? true; + {pageEnabled ? pageTitle : "Corwin Perren"} - - -
- {(Astro.props.title && showTitle && pageEnabled) && ( -

{Astro.props.title}

- )} - {pageEnabled && ( - - )} -
+ +
+ +
+ {(Astro.props.title && showTitle && pageEnabled) && ( +

{Astro.props.title}

+ )} + {pageEnabled && ( + + )} +
+