feat: initial commit, draft frontend

This commit is contained in:
2026-01-13 22:07:44 -08:00
commit 5a2bec37b9
41 changed files with 3260 additions and 0 deletions

21
src/lib/Image.svelte Normal file
View File

@@ -0,0 +1,21 @@
<script lang="ts">
type ImageStatus = 'loading' | 'loaded' | 'error';
import type { HTMLImgAttributes } from 'svelte/elements';
let { src, ...props }: HTMLImgAttributes = $props();
let status: ImageStatus = $state('loading');
</script>
{#if status === 'loading'}
<div class="h-full w-full animate-pulse bg-gray-800"></div>
{/if}
<img
{src}
hidden={status === 'loading'}
onload={() => {
status = 'loaded';
}}
onerror={() => (status = 'error')}
{...props}
/>