refactor: migrate to nuxt
This commit is contained in:
17
pages/404.vue
Normal file
17
pages/404.vue
Normal 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
8
pages/[...slug].vue
Normal 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
22
pages/index.vue
Normal 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>
|
||||
Reference in New Issue
Block a user