-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
333 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts" setup> | ||
const router = useRouter() | ||
function back() { | ||
router.back() | ||
} | ||
</script> | ||
|
||
<template> | ||
<YlfIconButton | ||
icon="i-ri-arrow-left-s-line" | ||
@click="back" | ||
/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts" setup> | ||
import type { Cookbook } from '~/types' | ||
defineProps<{ | ||
cookbook: Cookbook | ||
}>() | ||
const showDetail = ref(false) | ||
</script> | ||
|
||
<template> | ||
<button | ||
class="bg-$c-bg-alt" | ||
h-36 w-full inline-flex cursor-pointer items-center justify-center shadow | ||
@click="showDetail = true" | ||
> | ||
<slot /> | ||
</button> | ||
|
||
<CookbookDetail | ||
v-if="showDetail" | ||
absolute bottom-17 left-2 right-2 top-2 z-1 overflow-hidden shadow | ||
:cookbook="cookbook" | ||
> | ||
<YlfIconButton | ||
icon="i-ri-close-line" | ||
class="absolute right-2 top-2" | ||
@click="showDetail = false" | ||
/> | ||
</CookbookDetail> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script lang="ts" setup> | ||
import type { Cookbook } from '~/types' | ||
const props = defineProps<{ | ||
cookbook: Cookbook | ||
}>() | ||
const recipes = ref<Cookbook['recipes']>(props.cookbook.recipes) | ||
onMounted(async () => { | ||
recipes.value = (await import('../../data/recipe.json')).default | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="bg-$c-bg-alt" flex="~ col"> | ||
<h3 mt-4 font-bold> | ||
{{ cookbook.title }} | ||
</h3> | ||
<sub op="90" my-3> | ||
{{ cookbook.description }} | ||
</sub> | ||
<div mx-auto mt-2 p-0 border="1px" overflow-y="scroll"> | ||
<RecipeTable h="full" :recipes="recipes" /> | ||
</div> | ||
<slot /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts" setup> | ||
definePageMeta({ | ||
layout: 'child', | ||
title: '新建食谱书', | ||
}) | ||
</script> | ||
|
||
<template> | ||
<NuxtLink | ||
class="bg-$c-bg-alt" | ||
h-36 w-full inline-flex cursor-pointer items-center justify-center shadow | ||
to="/cookbooks/new" | ||
> | ||
<slot> | ||
<div i-ri-add-line /> | ||
</slot> | ||
</NuxtLink> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script lang="ts" setup> | ||
import type { Recipes } from 'types' | ||
defineProps<{ | ||
recipes: Recipes | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<table | ||
class="recipe-table bg-$c-bg" | ||
overflow="auto" h="full" | ||
> | ||
<thead> | ||
<tr> | ||
<th /> | ||
<th> | ||
名称 | ||
</th> | ||
<th> | ||
工具 | ||
</th> | ||
<th> | ||
材料 | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<RecipeTableItem | ||
v-for="(recipe, i) in recipes" | ||
:key="recipe.name" | ||
:index="i" :recipe="recipe" | ||
/> | ||
</tbody> | ||
</table> | ||
</template> | ||
|
||
<style lang="scss"> | ||
.recipe-table { | ||
font-size: 0.8rem; | ||
} | ||
tr, th, td { | ||
border: 1px solid black; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts" setup> | ||
import type { RecipeItem } from 'types' | ||
defineProps<{ | ||
index: number | ||
recipe: RecipeItem | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<tr> | ||
<td> | ||
{{ index }} | ||
</td> | ||
<td> | ||
<a | ||
class="text-blue-500" font-bold | ||
:href="recipe.link || `https://www.bilibili.com/video/${recipe.bv}`" | ||
target="_blank" | ||
> | ||
{{ recipe.name }} | ||
</a> | ||
</td> | ||
<td> | ||
{{ recipe.tools.join('、') }} | ||
</td> | ||
<td> | ||
{{ recipe.stuff.join('、') }} | ||
</td> | ||
</tr> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script lang="ts" setup> | ||
defineProps<{ | ||
icon?: string | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<button | ||
class="ylf-icon-button hover:(bg-blue-300 bg-opacity-20)" | ||
h-10 w-10 inline-flex items-center justify-center rounded-full | ||
> | ||
<slot> | ||
<div v-if="icon" text-xl :class="icon" /> | ||
</slot> | ||
</button> | ||
</template> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts" setup> | ||
defineProps<{ | ||
title?: string | ||
}>() | ||
const route = useRoute() | ||
</script> | ||
|
||
<template> | ||
<main class="text-center text-gray-700 dark:text-gray-200" p="t-5 b-15"> | ||
<div flex items-center justify-between> | ||
<BackBtn ml-3 /> | ||
<h2 flex items-center justify-center text-lg> | ||
{{ route.meta.title }} | ||
</h2> | ||
<DarkToggle mr-3 /> | ||
</div> | ||
|
||
<slot /> | ||
<TheBottomMenu fixed bottom-0 left-0 right-0 /> | ||
</main> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<template> | ||
<main class="text-center text-gray-700 dark:text-gray-200" p="t-8 b-15"> | ||
<slot /> | ||
<DarkToggle absolute right-5 top-5 /> | ||
<DarkToggle absolute right-3 top-5 /> | ||
<TheBottomMenu fixed bottom-0 left-0 right-0 /> | ||
</main> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
关于 | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script lang="ts" setup> | ||
definePageMeta({ | ||
layout: 'child', | ||
title: '自定义菜谱', | ||
}) | ||
const route = useRoute() | ||
const id = computed(() => route.query.id) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h3> | ||
开发中,敬请期待 | ||
</h3> | ||
|
||
<div grid="~ cols-3" gap="4" p="4"> | ||
<CookbookCard :cookbook="defaultCookbook"> | ||
默认菜谱 | ||
</CookbookCard> | ||
|
||
<NewCookbookCard /> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
新建 Cookbook | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script lang="ts" setup> | ||
definePageMeta({ | ||
layout: 'child', | ||
title: '菜谱 - ?', | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
asd | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
新建 Recipe | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
<script lang="ts" setup> | ||
const app = useAppStore() | ||
definePageMeta({ | ||
layout: 'child', | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<button> | ||
<CommonHeader> | ||
设置 | ||
</button> | ||
</CommonHeader> | ||
|
||
<div | ||
class="mx-auto max-w-md w-full" | ||
px-2 | ||
text-left | ||
> | ||
<YlfForm> | ||
<YlfFormItem label="离开网页后保留选中数据"> | ||
<YlfSwitch v-model="app.settings.keepLocalData" /> | ||
</YlfFormItem> | ||
<YlfFormItem label="更多设置,敬请期待" /> | ||
</YlfForm> | ||
</div> | ||
</div> | ||
</template> |
Oops, something went wrong.
94a9ff5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cook – ./
cook-today.vercel.app
cook-yunyoujun.vercel.app
cook-git-dev-yunyoujun.vercel.app
cook.yunle.app