feat: use nuxt layout

This commit is contained in:
2025-11-13 21:25:03 +01:00
parent e7912c90a2
commit 25c2625a1d
5 changed files with 70 additions and 36 deletions

35
app/layouts/default.vue Normal file
View File

@@ -0,0 +1,35 @@
<script setup lang="ts">
const showStats = useState("showStats", () => false);
</script>
<template>
<div
:style="{
display: 'flex',
flexDirection: 'column',
gap: '4px',
}"
>
<div :style="{ display: 'flex', alignItems: 'center', gap: '4px' }">
<input id="statsCheckbox" v-model="showStats" type="checkbox" />
<label for="statsCheckbox">Stats</label>
</div>
<div>
<Screen>
<slot name="top">
<slot />
</slot>
<Stats v-if="showStats" />
</Screen>
</div>
<div>
<Screen>
<slot name="bottom">
<slot />
</slot>
<Stats v-if="showStats" />
</Screen>
</div>
</div>
</template>