fix: build errors and merging projects and homepage

This commit is contained in:
2026-08-30 21:38:59 +00:00
parent 97ff9852cd
commit c9a7294d13
71 changed files with 10942 additions and 5413 deletions

View File

@@ -1,58 +1,65 @@
<script lang="ts">
import '../app.css';
import SiOsu from '~icons/simple-icons/osu';
import SiSteam from '~icons/simple-icons/steam';
import SiTwitch from '~icons/simple-icons/twitch';
import SiSpotify from '~icons/simple-icons/spotify';
import SiGithub from '~icons/simple-icons/github';
import SiYoutube from '~icons/simple-icons/youtube';
import SiLinkedin from '~icons/simple-icons/linkedin';
import SiInstagram from '~icons/simple-icons/instagram';
import SiX from '~icons/simple-icons/x';
// import SiBluesky from '~icons/simple-icons/bluesky';
// import SiThreads from '~icons/simple-icons/threads';
import SiMail from '~icons/simple-icons/gmail';
import CopyButton from '$lib/components/CopyButton.svelte';
import SiDiscord from '~icons/simple-icons/discord';
import SiSignal from '~icons/simple-icons/signal';
import SiWhatsapp from '~icons/simple-icons/whatsapp';
import { resolve } from '$app/paths';
let { children } = $props();
const links = [
{ icon: SiMail, label: 'Email', href: 'mailto:stan@stanrunge.dev' },
{ icon: SiGithub, label: 'GitHub', href: 'https://github.com/stanrunge' },
{ icon: SiLinkedin, label: 'LinkedIn', href: 'https://linkedin.com/in/stanrunge' },
{ icon: SiX, label: 'X', href: 'https://x.com/stanrunge' },
{ icon: SiYoutube, label: 'YouTube', href: 'https://youtube.com/@stanrunge' },
{ icon: SiInstagram, label: 'Instagram', href: 'https://instagram.com/stan_runge' },
// { icon: SiBluesky, label: 'Bluesky', href: 'https://bsky.app/profile/stanrunge.bsky.social' },
// { icon: SiThreads, label: 'Threads', href: 'https://www.threads.com/@stan_runge' },
{ icon: SiTwitch, label: 'Twitch', href: 'https://twitch.tv/stanrunge_' },
{
icon: SiSpotify,
label: 'Spotify',
href: 'https://open.spotify.com/user/e3o3qr9z7fpsu4gur9zz4y1ld'
},
{ icon: SiSteam, label: 'Steam', href: 'https://steamcommunity.com/id/stanrunge' },
{ icon: SiOsu, label: 'osu!', href: 'https://osu.ppy.sh/users/11212255' }
];
const copies = [
{ icon: SiWhatsapp, label: 'WhatsApp', value: 'stanrunge' },
{ icon: SiDiscord, label: 'Discord', value: 'stanrunge' },
{ icon: SiSignal, label: 'Signal', value: 'stan.443' }
];
</script>
<header class="flex justify-center gap-4">
<a href="https://osu.ppy.sh/users/11212255">
<img src="./osu.png" alt="osu" />
</a>
<a href="https://steamcommunity.com/id/stanrunge">
<img src="./steam.png" alt="steam" />
</a>
<a href="mailto://stan@stanrunge.dev">
<img src="./mail.png" alt="email" />
</a>
<a href="https://twitch.tv/stanrunge_">
<img src="./twitch.png" alt="twitch" />
</a>
<a href="https://open.spotify.com/user/e3o3qr9z7fpsu4gur9zz4y1ld?si=9874beb4481f45c3">
<img src="./spotify.png" alt="spotify" />
</a>
<a href="">
<img src="./signal.png" alt="signal" />
</a>
<a href="">
<img src="./bluesky.png" alt="bluesky" />
</a>
<div>
<img src="./discord.png" alt="discord" />
</div>
<a href="">
<img src="./whatsapp.png" alt="whatsapp" />
</a>
<a href="">
<img src="./threads.png" alt="threads" />
</a>
<a href="https://github.com/stanrunge">
<img src="./github.png" alt="github" />
</a>
<a href="https://youtube.com/@stanrunge">
<img src="./youtube.png" alt="youtube" />
</a>
<a href="https://linkedin.com/in/stanrunge">
<img src="./linkedin.png" alt="linkedin" />
</a>
<a href="https://instagram.com/stan_runge">
<img src="./instagram.png" alt="instagram" />
</a>
<a href="">
<img src="./facebook.png" alt="facebook" />
</a>
<a href="https://x.com/stanrunge">
<img src="./x.png" alt="x" />
</a>
<header class="flex justify-between items-center gap-4 py-4 px-4">
<a href={resolve('/')} class="text-2xl font-bold">Stan Runge</a>
<nav class="flex flex-wrap justify-center gap-4" aria-label="Social links">
{#each copies as c (c.label)}
<CopyButton {...c} />
{/each}
{#each links as { icon: Icon, label, href } (label)}
<a {href} aria-label={label} class="text-2xl transition hover:opacity-60">
<Icon />
</a>
{/each}
</nav>
</header>
{@render children()}

View File

@@ -1,5 +1,9 @@
<div class="text-center py-4 font-bold text-l">
<a href="/blog">Blog</a>
<script lang="ts">
import { resolve } from '$app/paths';
</script>
<div class="text-center py-2 font-bold text-xl">
<a href={resolve('/blog')}>Blog</a>
</div>
<div class="flex justify-around py-8">
@@ -34,10 +38,16 @@
</div>
</div>
<div class="pt-32">
<h1 class="font-black text-center text-4xl">Stan Runge</h1>
<img src="./quantum-chair.png" alt="stan runge" />
<p class="italic text-sm text-center">
<div class="pt-32 px-8">
<h1 class="font-black text-center text-4xl py-6">Stan Runge</h1>
<enhanced:img
class="rounded-2xl"
src="$lib/assets/stan.jpg?enhanced"
alt="stan runge"
sizes="(min-width: 768px) 760px, 90vw"
fetchpriority="high"
/>
<p class="italic text-sm text-center py-2">
me preparing for my presentation about <a href="https://arxiv.org/abs/2209.08167"
>quantum vision transformers</a
>
@@ -72,15 +82,15 @@
<p class="font-bold text-xl">infra</p>
<p>server, project deployments and dev config as code with setup script</p>
</div>
<a href="/projects/animaldex">
<a href={resolve('/projects/animaldex')}>
<p class="font-bold text-xl">animaldex</p>
<p>world map with pets & other animals around the neighborhood 😼</p>
</a>
<a href="/projects/catch-em-all">
<a href={resolve('/projects/catch-em-all')}>
<p class="font-bold text-xl">catch em all</p>
<p>table of all 1025 pokemon across 38 games with checkboxes for catching them all</p>
</a>
<a href="/projects/spotify-beatmap-finder">
<a href={resolve('/projects/spotify-beatmap-finder')}>
<p class="font-bold text-xl">spotify osu! map finder</p>
<p>small tool for finding osu! maps using a spotify url of a song or playlist</p>
</a>
@@ -94,4 +104,3 @@
</div>
</div>
</div>

View File

@@ -1,26 +1,29 @@
import { db } from "$lib/db"
import { blogArticles } from "$lib/db/schema";
import { redirect } from "@sveltejs/kit";
import type { PageServerLoad } from "./$types.js";
import { db } from '$lib/server/db';
import { blogArticles } from '$lib/server/db/schema';
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types.js';
export const load: PageServerLoad = async () => {
const articles = await db.select().from(blogArticles)
const articles = await db.select().from(blogArticles);
return {
blogArticles: articles
}
}
};
};
export const actions = {
default: async ({ request }): Promise<Response> => {
const formData = await request.formData();
const blogArticle = await db.insert(blogArticles).values({
title: formData.get('title')?.toString(),
slug: formData.get('slug')?.toString(),
content: formData.get('content')?.toString()
}).returning();
const blogArticle = await db
.insert(blogArticles)
.values({
title: formData.get('title')?.toString(),
slug: formData.get('slug')?.toString(),
content: formData.get('content')?.toString()
})
.returning();
return redirect(303, `/blog/${blogArticle[0].slug}`);
}
}
};

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { enhance } from '$app/forms';
import { resolve } from '$app/paths';
let { data } = $props();
@@ -8,13 +9,15 @@
<div class="text-center py-8 gap-2 flex align-center justify-center">
<h1 class="text-2xl">Blog (Stan's yapping corner)</h1>
<button onclick={() => createNewArticlePopup = true} class="bg-gray-800 rounded px-4 py-2 text-white font-bold">Write new article</button>
<button
onclick={() => (createNewArticlePopup = true)}
class="bg-gray-800 rounded px-4 py-2 text-white font-bold">Write new article</button
>
</div>
{#each data.blogArticles as article}
{#each data.blogArticles as article (article.slug)}
<div class="flex">
<a href="/blog/${article.slug}">{article.title}</a>
<a href={resolve('/blog/{slug}', { slug: article.slug })}>{article.title}</a>
<p>{article.createdAt?.toDateString()}</p>
</div>
{/each}

View File

@@ -1,22 +1,20 @@
import { db } from "$lib/db"
import { blogArticles } from "$lib/db/schema";
import { eq } from "drizzle-orm";
import { db } from '$lib/server/db';
import { blogArticles } from '$lib/server/db/schema';
import { eq } from 'drizzle-orm';
import type { PageServerLoad } from "./$types.js";
import { fail } from "@sveltejs/kit";
import type { PageServerLoad } from './$types.js';
import { fail } from '@sveltejs/kit';
export const load: PageServerLoad = async ({params }) => {
const article = await db.select().from(blogArticles).where(eq(blogArticles.slug, params.slug))
export const load: PageServerLoad = async ({ params }) => {
const article = await db.select().from(blogArticles).where(eq(blogArticles.slug, params.slug));
if (article.length === 0) {
return fail(404, { message: "Article not found" });
return fail(404, { message: 'Article not found' });
}
return {
blogArticle: article[0]
}
}
};
};
export const actions = {
}
export const actions = {};

View File

@@ -1,2 +1 @@
l
bu

View File

@@ -1,6 +1,5 @@
import { json, error } from '@sveltejs/kit';
import type { RequestHandler } from './$types';
import { detectBreed } from '$lib/server/breed-detector';
import { z } from 'zod';
const schema = z.object({ imageUrl: z.string().url() });
@@ -13,6 +12,6 @@ export const POST: RequestHandler = async ({ request }) => {
throw error(400, { message: 'imageUrl is required' });
}
const result = await detectBreed(parsed.data.imageUrl);
// const result = await detectBreed(parsed.data.imageUrl);
return json(result ?? { breed: null, confidence: 0 });
};

View File

@@ -1,12 +1,9 @@
import { db } from '$lib/server/db';
import { game, pokemonGameEntry, userEntry, userGame } from '$lib/server/db/schema';
import { eq, inArray } from 'drizzle-orm';
import type { Actions, PageServerLoad } from './$types';
import { availabilityValues } from '$lib/availability';
import { fail } from '@sveltejs/kit';
import type { Actions, PageServerLoad } from './catchemall/$types';
import { and, eq, inArray } from 'drizzle-orm';
// compact wire format for the ~19k game entries — full objects with repeated
// keys and availability strings add megabytes to the page payload
export type WireEntry = [id: number, gameId: number, availability: number, note?: string];
export const load: PageServerLoad = async ({ locals }) => {

View File

@@ -2,7 +2,6 @@
import { deserialize, enhance } from '$app/forms';
import { SvelteSet } from 'svelte/reactivity';
import type { PageProps } from './$types';
import { availabilityValues, type Availability } from '$lib/availability';
import type { Game } from '$lib/server/db/schema';
type Entry = { id: number; availability: Availability; note: string | null };

View File

@@ -1,6 +1,4 @@
import { db } from '$lib/db';
import { tasks } from '$lib/db/schema.js';
import { desc } from 'drizzle-orm';
import { db } from '$lib/server/db';
export const load = async () => {
return {
@@ -12,7 +10,9 @@ export const load = async () => {
}
}
},
orderBy: [desc(tasks.currentPoints)]
orderBy: {
currentPoints: 'desc'
}
})
};
};

View File

@@ -1,5 +1,5 @@
import { db } from '$lib/db';
import { tasks, tasksToTopics, topics } from '$lib/db/schema';
import { db } from '$lib/server/db';
import { tasks, tasksToTopics, topics } from '$lib/server/db/schema';
import { eq, and } from 'drizzle-orm';
export const load = async ({ cookies, params }) => {
@@ -12,7 +12,9 @@ export const load = async ({ cookies, params }) => {
}
}
},
where: eq(tasks.id, params.id)
where: {
id: Number(params.id)
}
}),
topics: await db.query.topics.findMany(),
editable: cookies.get('token')

View File

@@ -1,6 +1,6 @@
import { db } from "$lib/db"
import { tasks } from "$lib/db/schema"
import { redirect } from "@sveltejs/kit"
import { db } from '$lib/server/db';
import { tasks } from '$lib/server/db/schema';
import { redirect } from '@sveltejs/kit';
export const actions = {
default: async ({ cookies, request }) => {
@@ -8,10 +8,13 @@ export const actions = {
return { status: 401 };
}
const data = await request.formData()
const data = await request.formData();
const task = await db.insert(tasks).values({ name: data.get('name') }).returning()
const task = await db
.insert(tasks)
.values({ name: data.get('name') })
.returning();
redirect(303, '/progress/' + task[0].id)
redirect(303, '/progress/' + task[0].id);
}
}
};

View File

@@ -1,4 +1,4 @@
import { db } from '$lib/db';
import { db } from '$lib/server/db';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async () => {

View File

@@ -1,6 +1,4 @@
import { db } from '$lib/db';
import { topics } from '$lib/db/schema';
import { eq } from 'drizzle-orm';
import { db } from '$lib/server/db';
export const load = async ({ params }) => {
return {
@@ -12,7 +10,9 @@ export const load = async ({ params }) => {
}
}
},
where: eq(topics.id, params.id)
where: {
id: Number(params.id)
}
})
};
};