refactor: migrate to nuxt

This commit is contained in:
YunYouJun
2023-07-30 03:08:42 +08:00
parent c23f39e8c0
commit 0dfec1831b
90 changed files with 7864 additions and 3962 deletions

17
pages/404.vue Normal file
View File

@@ -0,0 +1,17 @@
<script setup lang="ts">
const router = useRouter()
</script>
<template>
<main p="x4 y10" text="center green-700 dark:gray-200">
<div text-4xl>
<div i-ri-error-warning-line inline-block />
</div>
<div>菜谱消失了</div>
<div>
<button text-sm btn m="3 t8" @click="router.back()">
返回
</button>
</div>
</main>
</template>

8
pages/[...slug].vue Normal file
View File

@@ -0,0 +1,8 @@
<template>
<main class="markdown-body text-left">
<ContentDoc v-slot="{ doc }">
<h1>{{ doc.title }}</h1>
<ContentRenderer :value="doc" />
</ContentDoc>
</main>
</template>

22
pages/index.vue Normal file
View File

@@ -0,0 +1,22 @@
<script lang="ts" setup>
const rStore = useRecipeStore()
</script>
<template>
<div>
<div text-4xl m="t-4">
<button
class="cursor-pointer transition active:text-green-800 hover:(text-green-600)"
title="重置"
@click="rStore.reset"
>
<div v-if="rStore.selectedStuff.length" i-mdi-pot-steam-outline />
<div v-else i-mdi-pot-mix-outline />
</button>
</div>
<p text="sm" m="b-4">
好的今天我们来做菜
</p>
<ChooseFood />
</div>
</template>