start page taking shape

This commit is contained in:
vabene1111
2024-03-17 09:58:26 +01:00
committed by smilerz
parent 728bb76a43
commit facbe08e20
4 changed files with 102 additions and 13 deletions

View File

@@ -1,11 +1,13 @@
<template>
<v-card :to="`/recipe/${recipe.id}`">
<v-img
<v-img v-if="recipe.image != null"
cover
height="50%"
:src="recipe.image"
></v-img>
<v-img v-else src="../../assets/recipe_no_image.svg" cover
height="50%"></v-img>
<v-card-item>
<v-card-title>{{ recipe.name }}</v-card-title>
@@ -38,15 +40,15 @@
</template>
<script lang="ts">
import {defineComponent} from 'vue'
import {defineComponent, PropType} from 'vue'
import KeywordsComponent from "@/components/display/KeywordsBar.vue";
import {Recipe} from "@/openapi";
import {Recipe, RecipeOverview} from "@/openapi";
export default defineComponent({
name: "RecipeCard",
components: {KeywordsComponent},
props: {
recipe: {} as Recipe,
recipe: {type: {} as PropType<Recipe|RecipeOverview>, required: true,},
show_keywords: {type: Boolean, required: false},
show_description: {type: Boolean, required: false},
}