chore: upgrade to svelte 5 and make basic layout

This commit is contained in:
2025-01-07 13:50:33 +01:00
parent 2131df26b2
commit 811dccfe16
6 changed files with 56 additions and 11 deletions

Binary file not shown.

View File

@@ -19,24 +19,24 @@
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "1.47.0", "@playwright/test": "1.47.0",
"@sveltejs/kit": "2.5.26", "@sveltejs/kit": "^2.5.27",
"@sveltejs/vite-plugin-svelte": "3.1.2", "@sveltejs/vite-plugin-svelte": "^4.0.0",
"@types/eslint": "9.6.1", "@types/eslint": "9.6.1",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"drizzle-kit": "^0.24.2", "drizzle-kit": "^0.24.2",
"eslint": "9.10.0", "eslint": "9.10.0",
"eslint-config-prettier": "9.1.0", "eslint-config-prettier": "9.1.0",
"eslint-plugin-svelte": "2.43.0", "eslint-plugin-svelte": "^2.45.1",
"globals": "15.9.0", "globals": "15.9.0",
"postcss": "^8.4.49", "postcss": "^8.4.49",
"prettier": "3.3.3", "prettier": "3.3.3",
"prettier-plugin-svelte": "3.2.6", "prettier-plugin-svelte": "3.2.6",
"svelte": "4.2.19", "svelte": "^5.0.0",
"svelte-check": "4.0.1", "svelte-check": "4.0.1",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
"typescript": "5.5.4", "typescript": "5.5.4",
"typescript-eslint": "8.4.0", "typescript-eslint": "8.4.0",
"vite": "5.4.3", "vite": "^5.4.4",
"vitest": "2.0.5" "vitest": "2.0.5"
}, },
"type": "module", "type": "module",

View File

@@ -1,12 +1,27 @@
<script lang="ts"> <script lang="ts">
import '../app.css'; import '../app.css';
interface Props {
children?: import('svelte').Snippet;
}
let { children }: Props = $props();
</script> </script>
<nav class="flex justify-around"> <nav class="flex justify-between bg-gray-200">
<div><a href="/">Stan Runge</a></div> <div class="m-4"><a href="/" class="font-bold text-2xl">Stan Runge</a></div>
<div> <div class="m-4 flex gap-4">
<a href="/progress">Progress</a> <div>
<a href="/progress">Progress</a>
</div>
<div>|</div>
<div class="flex gap-2">
<a href="https://x.com/stanrunge">X</a>
<a href="https://x.com/stanrunge">YouTube</a>
<a href="https://x.com/stanrunge">Twitch</a>
<a href="https://x.com/stanrunge">Email</a>
<a href="https://x.com/stanrunge">BlueSky</a>
</div>
</div> </div>
</nav> </nav>
<slot /> {@render children?.()}

View File

@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
export let data; let { data } = $props();
</script> </script>
<h1>Welcome to SvelteKit</h1> <h1>Welcome to SvelteKit</h1>

View File

@@ -0,0 +1,5 @@
export const load = async () => {
return {
tasks: []
}
}

View File

@@ -0,0 +1,25 @@
<script lang="ts">
let { data } = $props();
</script>
<h1 class="font-bold text-xl text-center m-4">Tasks ({data.tasks.length})</h1>
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Progress</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{#each data.tasks as task}
<tr>
<td></td>
<td></td>
<td></td>
<td><button>Delete</button></td>
</tr>
{/each}</tbody
>
</table>