Compare commits

..
3 Commits
Author SHA1 Message Date
encie22 3b702a1399 Prevent duplicate form and navbar listeners after page transitions, tidy env, env example
Build and Deploy to Web Server / deploy (push) Successful in 19m17s
2026-10-15 12:19:04 +10:30
encie22 433b84ea8f Fix IMG nesting div in p tags - invalid HTML 2026-10-15 12:11:28 +10:30
encie22 e22a4dc112 Upgrade to latest Astro (v7) 2026-10-15 12:05:04 +10:30
13 changed files with 2090 additions and 4097 deletions

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# Copy to `.env` and fill in real values. Never commit `.env`.
EMAIL_HOST=smtp.example.com
EMAIL_PORT=587
EMAIL_SECURE=false
EMAIL_USER=user@example.com
EMAIL_PASS=change-me
EMAIL_FROM=noreply@example.com
+2 -2
View File
@@ -7,7 +7,7 @@ below, unless otherwise indicated in a specific file's header.
## MIT License ## MIT License
Copyright (c) 2025 Nathan Cummins Copyright (c) 2026 Nathan Cummins
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@@ -32,7 +32,7 @@ SOFTWARE.
All non-code content in this repository — including, but not limited to, music All non-code content in this repository — including, but not limited to, music
(including melodies, harmonies, arrangements, lyrics, sound recordings, and (including melodies, harmonies, arrangements, lyrics, sound recordings, and
other musical elements), audio recordings, images, photographs, written other musical elements), audio recordings, images, photographs, written
biographies, descriptive texts, and project documentation — is copyright © 2025 biographies, descriptive texts, and project documentation — is copyright © 2026
Nathan Cummins, all rights reserved, unless otherwise stated in the file itself. Nathan Cummins, all rights reserved, unless otherwise stated in the file itself.
Such non-code content may not be copied, modified, distributed, or otherwise Such non-code content may not be copied, modified, distributed, or otherwise
+1 -1
View File
@@ -10,7 +10,7 @@ Thanks for checking it out!
## TL;DR ## TL;DR
- **Code:** All source code in this repository is licensed under the [MIT License](LICENSE). You are welcome to fork, clone, modify, or otherwise use the code in your own projects, provided you give appropriate credit. - **Code:** All source code in this repository is licensed under the [MIT License](LICENSE). You are welcome to fork, clone, modify, or otherwise use the code in your own projects, provided you give appropriate credit.
- **Non-code content:** All other materials — including music and audio (melodies, harmonies, arrangements, lyrics, sound recordings, and other musical elements and audio), images, photographs, written biographies, project descriptions, and any other creative works — are copyright © 2025 Nathan Cummins, **all rights reserved**. These may not be copied, modified, distributed, or otherwise used without prior written permission. - **Non-code content:** All other materials — including music and audio (melodies, harmonies, arrangements, lyrics, sound recordings, and other musical elements and audio), images, photographs, written biographies, project descriptions, and any other creative works — are copyright © 2026 Nathan Cummins, **all rights reserved**. These may not be copied, modified, distributed, or otherwise used without prior written permission.
If you use the code, I would appreciate proper credit by linking back to my [website](https://www.nathancummins.com.au) or including my name and email ([nathan@nathancummins.com.au](https://www.nathancummins.com.au)). If you use the code, I would appreciate proper credit by linking back to my [website](https://www.nathancummins.com.au) or including my name and email ([nathan@nathancummins.com.au](https://www.nathancummins.com.au)).
+1 -1
View File
@@ -64,4 +64,4 @@ export default defineConfig({
adapter: node({ adapter: node({
mode: "standalone" mode: "standalone"
}) })
}); });
+2039 -4058
View File
File diff suppressed because it is too large. Load diff
+6 -6
View File
@@ -9,19 +9,19 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/mdx": "^4.3.1", "@astrojs/mdx": "^8.0.3",
"@astrojs/node": "^9.4.3", "@astrojs/node": "^11.1.7",
"@astrojs/sitemap": "^3.4.2", "@astrojs/sitemap": "^3.7.4",
"@iconify-json/fa": "^1.2.1", "@iconify-json/fa": "^1.2.1",
"@iconify-json/fa7-brands": "^1.2.0", "@iconify-json/fa7-brands": "^1.2.0",
"@iconify-json/fa7-solid": "^1.2.0", "@iconify-json/fa7-solid": "^1.2.0",
"@iconify-json/mdi": "^1.2.3", "@iconify-json/mdi": "^1.2.3",
"@iconify-json/simple-icons": "^1.2.44", "@iconify-json/simple-icons": "^1.2.44",
"@tailwindcss/vite": "^4.1.11", "@tailwindcss/vite": "^4.1.11",
"astro": "^5.18.2", "astro": "^7.3.8",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"astro-robots-txt": "^1.0.0", "astro-robots-txt": "^1.0.0",
"astro-seo-schema": "^5.1.0", "astro-seo-schema": "^7.0.1",
"get-audio-duration": "^4.0.1", "get-audio-duration": "^4.0.1",
"nodemailer": "^7.0.5", "nodemailer": "^7.0.5",
"schema-dts": "^1.1.5", "schema-dts": "^1.1.5",
@@ -29,7 +29,7 @@
}, },
"devDependencies": { "devDependencies": {
"@cspell/dict-en-au": "^1.1.4", "@cspell/dict-en-au": "^1.1.4",
"@shikijs/transformers": "^3.9.2", "@shikijs/transformers": "^4.5.0",
"@types/howler": "^2.2.12", "@types/howler": "^2.2.12",
"@types/nodemailer": "^7.0.1", "@types/nodemailer": "^7.0.1",
"@typescript-eslint/eslint-plugin": "^8.38.0", "@typescript-eslint/eslint-plugin": "^8.38.0",
+2 -1
View File
@@ -77,7 +77,8 @@ const { id: ID = "contact-form" } = Astro.props;
<script define:vars={{ ID }}> <script define:vars={{ ID }}>
function init() { function init() {
const form = document.getElementById(ID); const form = document.getElementById(ID);
if (!form) return; if (!form || form.dataset.initialised) return;
form.dataset.initialised = "true";
const responseMsg = form.querySelector( const responseMsg = form.querySelector(
`#${CSS.escape(ID + "-response-message")}` `#${CSS.escape(ID + "-response-message")}`
); );
+3 -3
View File
@@ -11,14 +11,14 @@ const image = getImageByPath(src);
{ {
image && ( image && (
<div class="my-8"> <span class="my-8 block">
<Image <Image
src={image} src={image}
alt={alt} alt={alt}
width={1344} width={1344}
class="transition ease-in-out lg:hover:scale-150" class="transition ease-in-out lg:hover:scale-150"
/> />
<div class="mt-2 block w-full text-center text-sm italic">{alt}</div> <span class="mt-2 block w-full text-center text-sm italic">{alt}</span>
</div> </span>
) )
} }
+18 -11
View File
@@ -139,7 +139,8 @@ const { navbarDisplay = "normal" } = Astro.props as Props;
nav = document.getElementById("nav"); nav = document.getElementById("nav");
toggle = document.getElementById("menu-toggle"); toggle = document.getElementById("menu-toggle");
if (toggle) { if (toggle && !toggle.dataset.bound) {
toggle.dataset.bound = "true";
toggle.addEventListener("click", () => { toggle.addEventListener("click", () => {
if (nav) { if (nav) {
const visible = nav.getAttribute("data-mobile-menu") === "visible"; const visible = nav.getAttribute("data-mobile-menu") === "visible";
@@ -151,18 +152,24 @@ const { navbarDisplay = "normal" } = Astro.props as Props;
}); });
} }
document.addEventListener("keydown", (e) => { if (!document.documentElement.dataset.navbarKeydownBound) {
if ( document.documentElement.dataset.navbarKeydownBound = "true";
e.key === "Escape" && document.addEventListener("keydown", (e) => {
nav?.getAttribute("data-mobile-menu") === "visible" if (
) { e.key === "Escape" &&
nav.setAttribute("data-mobile-menu", "hidden"); nav?.getAttribute("data-mobile-menu") === "visible"
toggle?.setAttribute("aria-expanded", "false"); ) {
} nav.setAttribute("data-mobile-menu", "hidden");
}); toggle?.setAttribute("aria-expanded", "false");
}
});
}
checkScroll(); checkScroll();
}); });
window.addEventListener("scroll", checkScroll); if (!document.documentElement.dataset.navbarScrollBound) {
document.documentElement.dataset.navbarScrollBound = "true";
window.addEventListener("scroll", checkScroll, { passive: true });
}
</script> </script>
+2 -1
View File
@@ -1,5 +1,6 @@
import { glob } from "astro/loaders"; import { glob } from "astro/loaders";
import { defineCollection, z } from "astro:content"; import { z } from "astro/zod";
import { defineCollection } from "astro:content";
const projects = defineCollection({ const projects = defineCollection({
loader: glob({ pattern: "**/*.mdx", base: "./projects" }), loader: glob({ pattern: "**/*.mdx", base: "./projects" }),
+1 -2
View File
@@ -1,4 +1,4 @@
/// <reference types="@astrojs/image/client" /> /// <reference types="astro/client" />
/// <reference types="./types/SiteImage" /> /// <reference types="./types/SiteImage" />
interface Window { interface Window {
@@ -14,7 +14,6 @@ interface Window {
} }
interface ImportMetaEnv { interface ImportMetaEnv {
readonly SITE?: string;
readonly EMAIL_USER: string; readonly EMAIL_USER: string;
readonly EMAIL_PASS: string; readonly EMAIL_PASS: string;
readonly EMAIL_PORT: number; readonly EMAIL_PORT: number;
+2 -4
View File
@@ -67,10 +67,8 @@ import { Image } from "astro:assets";
<ul> <ul>
<LI> <LI>
<span class="font-bold" <span class="font-bold"
><TextLink ><TextLink href="/projects/video-game/dungeons-and-dining-tables/"
href="/projects/video-game/dungeons-and-dining-tables/" >Dungeons and Dining Tables</TextLink
>
Dungeons and Dining Tables</TextLink
>:</span >:</span
> a cosy, highly orchestral score full of warmth and colour. > a cosy, highly orchestral score full of warmth and colour.
</LI> </LI>
+6 -7
View File
@@ -8,25 +8,24 @@
"dist" "dist"
], ],
"compilerOptions": { "compilerOptions": {
"baseUrl": ".",
"paths": { "paths": {
"@/*": [ "@/*": [
"src/*" "./src/*"
], ],
"@layouts/*": [ "@layouts/*": [
"src/layouts/*" "./src/layouts/*"
], ],
"@components/*": [ "@components/*": [
"src/components/*" "./src/components/*"
], ],
"@assets/*": [ "@assets/*": [
"src/assets/*" "./src/assets/*"
], ],
"@lib/*": [ "@lib/*": [
"src/lib/*" "./src/lib/*"
], ],
"@data/*": [ "@data/*": [
"src/data/*" "./src/data/*"
] ]
} }
} }