feat(ssg): fixed incorrect ssg configs

This commit is contained in:
2025-07-17 17:21:39 -06:00
parent 7d365b6710
commit 3a5a697c95
10 changed files with 106 additions and 154 deletions

13
package-lock.json generated
View File

@ -7,9 +7,6 @@
"": {
"name": "darkicewolf50",
"version": "3.0.0",
"dependencies": {
"date-fns": "^4.1.0"
},
"devDependencies": {
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.31.0",
@ -2003,16 +2000,6 @@
"node": ">=4"
}
},
"node_modules/date-fns": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz",
"integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/kossnocorp"
}
},
"node_modules/debug": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",

View File

@ -30,8 +30,5 @@
"vite": "^7.0.5",
"vite-plugin-devtools-json": "^0.3.0",
"wrangler": "^4.25.0"
},
"dependencies": {
"date-fns": "^4.1.0"
}
}

View File

@ -0,0 +1,69 @@
<script>
export const prerender = true;
</script>
<footer>
<p>Brock Tomlinson © 2025</p>
<div>
<a href="mailto:darkicewolf50@gmail.com">
<img src="https://www.svgrepo.com/show/491226/email.svg" alt="Email's logo/icon" />
<p>Email</p>
</a>
<a href="https://www.youtube.com/@darkicewolf50">
<img src="https://www.svgrepo.com/show/521936/youtube.svg" alt="Youtube's logo/icon" />
<p>Youtube</p>
</a>
<a href="https://www.linkedin.com/in/brock-tomlinson/">
<img src="https://www.svgrepo.com/show/521725/linkedin.svg" alt="LinkedIn's logo/icon" />
<p>LinkedIn</p>
</a>
<a href="https://www.twitch.tv/darkicewolf50">
<img src="https://www.svgrepo.com/show/519925/twitch.svg" alt="Twitch's logo/icon" />
<p>Twitch</p>
</a>
<a href="https://github.com/darkicewolf50">
<img src="https://www.svgrepo.com/show/512317/github-142.svg" alt="Github's logo/icon" />
<p>Github</p>
</a>
</div>
</footer>
<style>
footer {
display: flex;
flex-direction: column;
text-align: center;
background-color: var(--card-background-color);
border-radius: var(--card-border-radius);
/* background-color: #d3d3d3; */
}
footer div {
display: flex;
flex-direction: row;
flex: 1 1 2;
justify-content: space-evenly;
}
footer img {
height: 60px;
filter: invert() hue-rotate(180deg);
}
footer a {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
color: inherit;
}
footer a:hover {
color: #91a4d2;
cursor: pointer;
filter: brightness(0) saturate(100%) invert(65%) sepia(13%) saturate(733%) hue-rotate(187deg)
brightness(95%) contrast(90%);
}
</style>

View File

@ -0,0 +1,31 @@
<script>
export const prerender = true;
</script>
<header>
<nav>
<a href="/">Home</a>
<a href="/projects">Projects</a>
<a href="/blogs/0">Blogs</a>
<a href="/contact">Contact</a>
</nav>
</header>
<style>
nav {
display: flex;
flex-direction: row;
}
nav a {
color: #ffffff;
margin-right: 20px;
text-decoration: none;
transition: color 0.2s ease;
}
nav a:hover {
cursor: pointer;
color: #91a4d2;
}
</style>

View File

@ -1,7 +1,5 @@
<script>
import { page } from '$app/state';
// $inspect(page.status);
</script>
<title>Brock Tomlinson - Not Found</title>

View File

@ -1 +0,0 @@
export const prerender = true;

View File

@ -1 +0,0 @@
export const prerender = true;

View File

@ -1,43 +1,12 @@
<script>
import Top from '$lib/components/layout/Top.svelte';
import Bottom from '$lib/components/layout/Bottom.svelte';
let { children } = $props();
</script>
<header>
<nav>
<a href="/">Home</a>
<a href="/projects">Projects</a>
<a href="/blogs/0">Blogs</a>
<a href="/contact">Contact</a>
</nav>
</header>
<Top />
{@render children()}
<footer>
<p>Brock Tomlinson © 2025</p>
<div>
<a href="mailto:darkicewolf50@gmail.com">
<img src="https://www.svgrepo.com/show/491226/email.svg" alt="Email's logo/icon" />
<p>Email</p>
</a>
<a href="https://www.youtube.com/@darkicewolf50">
<img src="https://www.svgrepo.com/show/521936/youtube.svg" alt="Youtube's logo/icon" />
<p>Youtube</p>
</a>
<a href="https://www.linkedin.com/in/brock-tomlinson/">
<img src="https://www.svgrepo.com/show/521725/linkedin.svg" alt="LinkedIn's logo/icon" />
<p>LinkedIn</p>
</a>
<a href="https://www.twitch.tv/darkicewolf50">
<img src="https://www.svgrepo.com/show/519925/twitch.svg" alt="Twitch's logo/icon" />
<p>Twitch</p>
</a>
<a href="https://github.com/darkicewolf50">
<img src="https://www.svgrepo.com/show/512317/github-142.svg" alt="Github's logo/icon" />
<p>Github</p>
</a>
</div>
</footer>
<Bottom />
<style>
:global(:root) {
@ -64,59 +33,4 @@
padding: 0svh 2svw;
padding-bottom: 1svh;
}
nav {
display: flex;
flex-direction: row;
}
nav a {
color: #ffffff;
margin-right: 20px;
text-decoration: none;
transition: color 0.2s ease;
}
nav a:hover {
cursor: pointer;
color: #91a4d2;
}
footer {
display: flex;
flex-direction: column;
text-align: center;
background-color: var(--card-background-color);
border-radius: var(--card-border-radius);
/* background-color: #d3d3d3; */
}
footer div {
display: flex;
flex-direction: row;
flex: 1 1 2;
justify-content: space-evenly;
}
footer img {
height: 60px;
filter: invert() hue-rotate(180deg);
}
footer a {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
color: inherit;
}
footer a:hover {
color: #91a4d2;
cursor: pointer;
filter: brightness(0) saturate(100%) invert(65%) sepia(13%) saturate(733%) hue-rotate(187deg)
brightness(95%) contrast(90%);
}
</style>

View File

@ -1,6 +1,8 @@
<script>
import Contact from '$lib/components/contact.svelte';
export const prerender = true;
let contactName = $state('');
let contactEmail = $state('');
let contactMessage = $state('');

View File

@ -1,44 +0,0 @@
// src/routes/sitemap.xml/+server.ts (or +server.js)
import { format } from 'date-fns'; // Optional, if you want <lastmod> etc.
export async function GET() {
const baseUrl = 'https://yourdomain.com'; // Replace with your domain
const staticPages = [
'', // Home page
'contact',
'projects'
];
const urls = staticPages
.map(
(path) => `
<url>
<loc>${baseUrl}/${path}</loc>
<lastmod>${format(new Date(), 'yyyy-MM-dd')}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>`
)
.join('');
return new Response(
`
<?xml version="1.0" encoding="UTF-8" ?>
<urlset
xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="https://www.w3.org/1999/xhtml"
xmlns:mobile="https://www.google.com/schemas/sitemap-mobile/1.0"
xmlns:news="https://www.google.com/schemas/sitemap-news/0.9"
xmlns:image="https://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="https://www.google.com/schemas/sitemap-video/1.1"
>
${urls}
</urlset>`.trim(),
{
headers: {
'Content-Type': 'application/xml'
}
}
);
}