chess board
This commit is contained in:
parent
42c2f00eea
commit
5800574560
3 changed files with 19 additions and 4 deletions
|
|
@ -6,5 +6,6 @@
|
|||
</script>
|
||||
|
||||
<svelte:head><link rel="icon" href={favicon} /></svelte:head>
|
||||
|
||||
{@render children()}
|
||||
<div class="flex justify-center items-center min-h-full">
|
||||
{@render children()}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,13 @@
|
|||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
||||
<script lang="ts">
|
||||
const board = new Array(8**2);
|
||||
</script>
|
||||
|
||||
<div class="grid grid-cols-8 gap-0 border-2">
|
||||
{#each board as info, index}
|
||||
<div class="h-20 aspect-square flex justify-center items-center
|
||||
{index % 2 === Math.floor(index / 8) % 2 ? 'bg-stone-200 text-stone-800' : 'bg-stone-800 text-stone-200'}
|
||||
">
|
||||
{index}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
|
@ -1 +1,4 @@
|
|||
@import 'tailwindcss';
|
||||
|
||||
html, body { @apply h-full; }
|
||||
body { @apply bg-gray-900 text-gray-100; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue