This commit is contained in:
2025-06-05 21:20:59 +02:00
commit 988534ed01
26 changed files with 983 additions and 0 deletions

25
src/routes/+layout.svelte Normal file
View File

@@ -0,0 +1,25 @@
<script lang="ts">
import '../app.css';
import { ModeWatcher } from 'mode-watcher';
import { ChatSocket } from '$lib/socket';
import { onMount } from 'svelte';
import { browser } from '$app/environment';
let { children } = $props();
let socket;
onMount(() => {
if (browser) {
socket = new ChatSocket('ws://localhost:3000/ws');
}
});
</script>
<ModeWatcher />
<div class="flex h-full w-full flex-col items-center">
<div class="my-8 flex h-full w-full max-w-screen-2xl flex-col">
{@render children()}
</div>
</div>