fixed rendering of recipe cards without descriptions

This commit is contained in:
vabene1111
2021-06-30 14:42:48 +02:00
parent c4905d39c1
commit c5bec8b69e

View File

@ -23,12 +23,15 @@
<b-card-text style="text-overflow: ellipsis;"> <b-card-text style="text-overflow: ellipsis;">
<template v-if="recipe !== null"> <template v-if="recipe !== null">
<recipe-rating :recipe="recipe"></recipe-rating> <recipe-rating :recipe="recipe"></recipe-rating>
<span v-if="recipe.description.length > 120"> <template v-if="recipe.description !== null">
<span v-if="recipe.description.length > 120">
{{ recipe.description.substr(0, 120) + "\u2026" }} {{ recipe.description.substr(0, 120) + "\u2026" }}
</span> </span>
<span v-if="recipe.description.length <= 120"> <span v-if="recipe.description.length <= 120">
{{ recipe.description }} {{ recipe.description }}
</span> </span>
</template>
<br/> <!-- TODO UGLY! --> <br/> <!-- TODO UGLY! -->
<last-cooked :recipe="recipe"></last-cooked> <last-cooked :recipe="recipe"></last-cooked>
<keywords :recipe="recipe" style="margin-top: 4px"></keywords> <keywords :recipe="recipe" style="margin-top: 4px"></keywords>