1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-19 13:19:41 +02:00

fix: print view for recipes with multiple ingredient sections (#1580)

* fix for recipes with multiple ingredient sections

* removed unused key
This commit is contained in:
Michael Genson 2022-08-20 02:01:55 -05:00 committed by GitHub
parent 692d91e338
commit f231109194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,11 +22,11 @@
:key="`ingredient-section-${sectionIndex}`"
class="print-section"
>
<div class="ingredient-grid" :style="{gridTemplateRows:`repeat(${Math.ceil(ingredientSection.ingredients.length / 2)}, 1fr)`}">
<h4 v-if="ingredientSection.ingredients[0].title" class="ingredient-title mt-2">
{{ ingredientSection.ingredients[0].title }}
</h4>
<div class="ingredient-grid" :style="{gridTemplateRows:`repeat(${Math.ceil(ingredientSection.ingredients.length / 2)}, min-content)`}">
<template v-for="(ingredient, ingredientIndex) in ingredientSection.ingredients">
<h4 v-if="ingredient.title" :key="`ingredient-title-${ingredientIndex}`" class="ingredient-title mt-2">
{{ ingredient.title }}
</h4>
<p :key="`ingredient-${ingredientIndex}`" class="ingredient-body" v-html="parseText(ingredient)" />
</template>
</div>