mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-06 02:26:49 +00:00
add cookbook page
This commit is contained in:
parent
fc022e024d
commit
35af888724
4 changed files with 2151 additions and 0 deletions
1
app.vue
1
app.vue
|
|
@ -3,6 +3,7 @@
|
||||||
<app-navbar>
|
<app-navbar>
|
||||||
<template #menu>
|
<template #menu>
|
||||||
<li><nuxt-link to="/categories">Categories</nuxt-link></li>
|
<li><nuxt-link to="/categories">Categories</nuxt-link></li>
|
||||||
|
<li><nuxt-link to="/cookbook">Cookbook</nuxt-link></li>
|
||||||
</template>
|
</template>
|
||||||
</app-navbar>
|
</app-navbar>
|
||||||
<main class="flex-grow">
|
<main class="flex-grow">
|
||||||
|
|
|
||||||
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
31
pages/cookbook.vue
Normal file
31
pages/cookbook.vue
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type { Recipe } from "~/types/recipe";
|
||||||
|
|
||||||
|
const cookbook = [] as Recipe[];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<main>
|
||||||
|
<div
|
||||||
|
v-if="cookbook.length === 0"
|
||||||
|
class="flex justify-center items-center min-h-screen"
|
||||||
|
>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<span>No recipes found in this category.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul>
|
||||||
|
<li v-for="recipe in cookbook" :key="recipe.id">
|
||||||
|
<nuxt-link :to="`/recipes/${recipe.id}`">
|
||||||
|
<recipe-card
|
||||||
|
:title="recipe.title"
|
||||||
|
:picture-url="recipe.pictureUrl"
|
||||||
|
:video-url="recipe.videoUrl"
|
||||||
|
:category="recipe.category"
|
||||||
|
:origin="recipe.origin"
|
||||||
|
/>
|
||||||
|
</nuxt-link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
Loading…
Reference in a new issue