various improvements

This commit is contained in:
vabene1111
2025-03-31 16:06:20 +02:00
parent 235c5d6b4a
commit c03e82f094
11 changed files with 81 additions and 84 deletions

View File

@@ -1,6 +1,6 @@
<template>
<component :is="compiled_instructions" :ingredient_factor="ingredient_factor" :instructions_html="instructions_html"></component>
<!-- <div v-html="instructions_html"></div>-->
<!-- <div v-html="instructions_html"></div>-->
</template>
<script>
@@ -31,7 +31,8 @@ export default defineComponent({
ingredient_factor: {type: Number, required: true},
},
components: {ScalableNumber,},
template: `<div>${this.instructions_html}</div>`
template: `
<div>${this.instructions_html}</div>`
}))
}
},
@@ -41,3 +42,14 @@ export default defineComponent({
})
</script>
<style>
/**
vuetify removes all margins and paddings which break layout, re-add them by reverting vuetify change
*/
p, ol, ul, li {
padding: revert;
margin: revert;
}
</style>

View File

@@ -26,7 +26,7 @@
<v-col cols="12" md="6" v-if="step.ingredients.length > 0">
<ingredients-table v-model="step.ingredients" :ingredient-factor="ingredientFactor"></ingredients-table>
</v-col>
<v-col cols="12" md="6">
<v-col cols="12" md="6" class="markdown-body">
<instructions :instructions_html="step.instructionsMarkdown" :ingredient_factor="ingredientFactor" v-if="step.instructionsMarkdown != undefined"></instructions>
<!-- sub recipes dont have a correct schema, thus they use different variable naming -->
<instructions :instructions_html="step.instructions_markdown" :ingredient_factor="ingredientFactor" v-else></instructions>