bring server files into project.

This commit is contained in:
2025-01-21 11:50:01 -08:00
parent 58d100b5d3
commit 8700c431cf
32 changed files with 2200 additions and 9 deletions

View File

@ -0,0 +1,52 @@
<script lang="ts">
type GameData = {id: number, name: string, players: string[]}
const games: GameData[] = [
{id: 1, name: "The Worst", players: ["Bob", "Ted", "George"]},
{id: 2, name: "The Best", players: ["Shelly", "William", "Abby"]},
{id: 3, name: "The One with the Treasure Chest", players: ["Jack"]},
];
</script>
<main>
<h1>Let&#146;s Play Ten Thousand</h1>
<table>
<thead>
<tr>
<td>No.</td>
<td>Name</td>
<td>Players</td>
</tr>
</thead>
<tbody>
{#each games as game}
{@render GameRow(game)}
{/each}
</tbody>
</table>
</main>
{#snippet GameRow (game: GameData)}
<tr>
<td>{game.id}</td>
<td>{game.name}</td>
<td>{game.players.length}</td>
</tr>
{/snippet}
<style>
main {
width: 60rem;
margin: auto;
}
td {
border: solid black 1px;
padding: 1rem;
}
table {
width: 100%;
}
</style>