add cookbook page

This commit is contained in:
Ruidy 2025-04-13 00:06:19 +02:00
parent fc022e024d
commit 35af888724
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
4 changed files with 2151 additions and 0 deletions

View file

@ -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">

2119
bun.lock Normal file

File diff suppressed because it is too large Load diff

BIN
bun.lockb

Binary file not shown.

31
pages/cookbook.vue Normal file
View 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>