From 6b6e2fb958a76df82cf01d0de0eaf77977274c6c Mon Sep 17 00:00:00 2001 From: David Pine Date: Thu, 30 Oct 2025 19:55:21 -0500 Subject: [PATCH 1/3] yeah yeah yeahs: Refactor code structure for improved readability and maintainability --- src/frontend/astro.config.mjs | 7 +- src/frontend/package-lock.json | 26 - src/frontend/package.json | 3 +- src/frontend/src/assets/maps/map-darkdots.svg | 1011 +++++++++++++++++ .../src/assets/maps/map-lightdots.svg | 1007 ++++++++++++++++ src/frontend/src/components/AspireMap.astro | 94 +- 6 files changed, 2039 insertions(+), 109 deletions(-) create mode 100644 src/frontend/src/assets/maps/map-darkdots.svg create mode 100644 src/frontend/src/assets/maps/map-lightdots.svg diff --git a/src/frontend/astro.config.mjs b/src/frontend/astro.config.mjs index 0ca7993..750bd59 100644 --- a/src/frontend/astro.config.mjs +++ b/src/frontend/astro.config.mjs @@ -218,10 +218,5 @@ export default defineConfig({ }) ], }), - ], - vite: { - optimizeDeps: { - include: ['leaflet'], - } - }, + ] }); diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index c8ab982..b5a664c 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -24,7 +24,6 @@ "@lunariajs/starlight": "^0.1.1", "asciinema-player": "^3.10.0", "astro": "^5.15.1", - "astro-leaflet": "^1.8.1", "astro-mermaid": "^1.1.0", "astro-tooltips": "^0.6.2", "mermaid": "^11.12.1", @@ -2538,15 +2537,6 @@ "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", "license": "MIT" }, - "node_modules/@types/leaflet": { - "version": "1.9.20", - "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.20.tgz", - "integrity": "sha512-rooalPMlk61LCaLOvBF2VIf9M47HgMQqi5xQ9QRi7c8PkdIe0WrIi5IxXUXQjAdL0c+vcQ01mYWbthzmp9GHWw==", - "license": "MIT", - "dependencies": { - "@types/geojson": "*" - } - }, "node_modules/@types/mdast": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", @@ -3002,16 +2992,6 @@ "astro": "^4.0.0-beta || ^5.0.0-beta || ^3.3.0" } }, - "node_modules/astro-leaflet": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/astro-leaflet/-/astro-leaflet-1.8.1.tgz", - "integrity": "sha512-aemdhzI+SmxDBARBz7Azohy3EayQsciR1uQC+buY7PzJ7aYl4/Ib8798QNgUQ7VDY4Y0VogJceHS/RM36XH31A==", - "license": "MIT", - "dependencies": { - "@types/leaflet": "^1.9.20", - "leaflet": "^1.9.4" - } - }, "node_modules/astro-mermaid": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/astro-mermaid/-/astro-mermaid-1.1.0.tgz", @@ -5679,12 +5659,6 @@ "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==", "license": "MIT" }, - "node_modules/leaflet": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", - "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", - "license": "BSD-2-Clause" - }, "node_modules/linkedom": { "version": "0.14.26", "resolved": "https://registry.npmjs.org/linkedom/-/linkedom-0.14.26.tgz", diff --git a/src/frontend/package.json b/src/frontend/package.json index 036ca96..7b16e52 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -45,7 +45,6 @@ "@lunariajs/starlight": "^0.1.1", "asciinema-player": "^3.10.0", "astro": "^5.15.1", - "astro-leaflet": "^1.8.1", "astro-mermaid": "^1.1.0", "astro-tooltips": "^0.6.2", "mermaid": "^11.12.1", @@ -66,4 +65,4 @@ "cross-env": "^10.1.0", "node-fetch": "^3.3.2" } -} +} \ No newline at end of file diff --git a/src/frontend/src/assets/maps/map-darkdots.svg b/src/frontend/src/assets/maps/map-darkdots.svg new file mode 100644 index 0000000..ac92512 --- /dev/null +++ b/src/frontend/src/assets/maps/map-darkdots.svg @@ -0,0 +1,1011 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/frontend/src/assets/maps/map-lightdots.svg b/src/frontend/src/assets/maps/map-lightdots.svg new file mode 100644 index 0000000..0180b43 --- /dev/null +++ b/src/frontend/src/assets/maps/map-lightdots.svg @@ -0,0 +1,1007 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/frontend/src/components/AspireMap.astro b/src/frontend/src/components/AspireMap.astro index 246e2c0..652b5c4 100644 --- a/src/frontend/src/components/AspireMap.astro +++ b/src/frontend/src/components/AspireMap.astro @@ -1,85 +1,29 @@ --- -import { Leaflet, Marker, Popup } from "astro-leaflet"; - -// Coordinates for your cities -type LatLng = [number, number]; - -const cityMarkers: { latlng: LatLng; popup: string }[] = [ - { latlng: [46.8083, -100.7837], popup: "Bismarck, ND" }, - { latlng: [47.6062, -122.3321], popup: "Seattle, WA" }, - { latlng: [42.3601, -71.0589], popup: "Boston, MA" }, - { latlng: [43.0389, -87.9065], popup: "Milwaukee, WI" }, - { latlng: [45.8081, 9.0852], popup: "Como, Italy" }, - { latlng: [50.1544, -5.0711], popup: "Falmouth, UK" }, - { latlng: [-36.9848, 143.3906], popup: "Victoria, Australia" }, - { latlng: [-31.9505, 115.8605], popup: "Perth, Australia" }, - { latlng: [50.0755, 14.4378], popup: "Prague, Czech Republic" }, - { latlng: [1.3521, 103.8198], popup: "Singapore" }, - { latlng: [38.9072, -77.0369], popup: "Washington, DC" }, - { latlng: [43.4799, -110.7624], popup: "Jackson, WY" }, -]; +import ThemeImage from "./ThemeImage.astro"; +import mapLight from "../assets/maps/map-lightdots.svg"; +import mapDark from "../assets/maps/map-darkdots.svg"; --- -
- - { - cityMarkers.map((city) => ( - - - - )) - } - +
+
From c9b0e414406975e6164805cde0e6db7f543f3a9b Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 31 Oct 2025 07:19:56 -0500 Subject: [PATCH 2/3] fix: Improve responsive padding and theme styles for AspireMap component --- src/frontend/src/components/AspireMap.astro | 26 +++++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/components/AspireMap.astro b/src/frontend/src/components/AspireMap.astro index 652b5c4..712d402 100644 --- a/src/frontend/src/components/AspireMap.astro +++ b/src/frontend/src/components/AspireMap.astro @@ -13,17 +13,33 @@ import mapDark from "../assets/maps/map-darkdots.svg";
From 3d8cf027437db40f9639ac7bac949dde42f28296 Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 31 Oct 2025 08:32:08 -0500 Subject: [PATCH 3/3] fix: Add comment for responsive padding in AspireMap component --- src/frontend/src/components/AspireMap.astro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontend/src/components/AspireMap.astro b/src/frontend/src/components/AspireMap.astro index 712d402..079b307 100644 --- a/src/frontend/src/components/AspireMap.astro +++ b/src/frontend/src/components/AspireMap.astro @@ -33,6 +33,8 @@ import mapDark from "../assets/maps/map-darkdots.svg"; text-align: center; padding-block: 1rem; + + /* Responsive padding: min 1rem up to 14rem on large screens */ padding-inline: clamp( var(--pad-min), calc(