Files
personal-website/src/lib/components/ProjectIcon.svelte
Stan Runge 0846cf7d77 feat: house tracker with home worker, alerts and listing map
Collects Pararius rent/buy listings into Postgres via a worker that runs on a
residential connection, sends Discord/ntfy alerts for new listings matching
rules, and shows an admin-only map, market stats and worker log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HfF5tnChi8tkCx9svJP6D
2026-10-11 20:57:20 +00:00

57 lines
1.7 KiB
Svelte

<script lang="ts" module>
const images = import.meta.glob<string>('../assets/projects/*.{webp,png,jpg,jpeg,avif,svg}', {
eager: true,
query: '?url',
import: 'default'
});
const extensions = ['webp', 'png', 'jpg', 'jpeg', 'avif', 'svg'];
</script>
<script lang="ts">
import CandlestickChart from 'lucide-svelte/icons/candlestick-chart';
import ChartNoAxesCombined from 'lucide-svelte/icons/chart-no-axes-combined';
import FolderKanban from 'lucide-svelte/icons/folder-kanban';
import Gamepad2 from 'lucide-svelte/icons/gamepad-2';
import House from 'lucide-svelte/icons/house';
import Globe2 from 'lucide-svelte/icons/globe-2';
import Languages from 'lucide-svelte/icons/languages';
import Music2 from 'lucide-svelte/icons/music-2';
import PawPrint from 'lucide-svelte/icons/paw-print';
import Trophy from 'lucide-svelte/icons/trophy';
import Wallet from 'lucide-svelte/icons/wallet';
let { name, class: className = 'size-5' }: { name: string; class?: string } = $props();
const icons = {
'vash esports': Trophy,
'game tracker': Gamepad2,
animaldex: PawPrint,
'osu! map finder': Music2,
'derby lens': ChartNoAxesCombined,
'world opinions': Globe2,
'language learner': Languages,
'money tracker': Wallet,
'cs prices': CandlestickChart,
'house tracker': House
};
const Icon = $derived(icons[name as keyof typeof icons] ?? FolderKanban);
const filename = $derived(
name
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-|-$/g, '')
);
const image = $derived(
extensions
.map((extension) => images[`../assets/projects/${filename}.${extension}`])
.find(Boolean)
);
</script>
{#if image}
<img src={image} alt="" class="size-full rounded-sm object-cover" />
{:else}
<Icon class={className} aria-hidden="true" />
{/if}