Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
[#1935](https://github.com/nextcloud/cookbook/pull/1935) @christianlupus
- remove constant se in RecipeView
[#1942](https://github.com/nextcloud/cookbook/pull/1942) @j0hannesr0th

### Fixed
- **Print view:** Hide yield calculator, ingredient-copy button, yield-calculation warnings
[#1949](https://github.com/nextcloud/cookbook/pull/1949) @seyfeb
- fix wrong parsing of recipe yield input
[#1944](https://github.com/nextcloud/cookbook/pull/1944) @j0hannesr0th

Expand Down
6 changes: 6 additions & 0 deletions src/components/RecipeView/RecipeIngredient.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,10 @@ li > .ingredient {
li > span.icon-error {
margin-left: 0.3em;
}

@media print {
li > span.icon-error {
display: none;
}
}
</style>
43 changes: 33 additions & 10 deletions src/components/RecipeView/RecipeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@
<strong
>{{ t('cookbook', 'Servings') }}:
</strong>
<span>
<span class="print-only">
{{ recipeYield }}
</span>
<span class="print-hidden">
<button
:disabled="recipeYield === 1"
@click="changeRecipeYield(false)"
Expand Down Expand Up @@ -143,7 +146,7 @@
<span>{{ t('cookbook', 'Ingredients') }}</span>
<NcButton
v-if="scaledIngredients.length"
class="copy-ingredients"
class="copy-ingredients print-hidden"
:type="'tertiary'"
aria-label="Copy all ingredients to the clipboard"
:title="t('cookbook', 'Copy ingredients')"
Expand All @@ -165,19 +168,17 @@
:recipe-ingredients-have-subgroups="
recipeIngredientsHaveSubgroups
"
:style="{
'font-style': ingredientsWithValidSyntax[
idx
]
? 'normal'
: 'italic',
}"
:class="
ingredientsWithValidSyntax[idx]
? ''
: 'ingredient-highlighted'
"
/>
</ul>

<div
v-if="!ingredientsSyntaxCorrect"
class="ingredient-parsing-error"
class="ingredient-parsing-error print-hidden"
>
<hr />
<span class="icon-error" />
Expand Down Expand Up @@ -799,6 +800,10 @@ export default {
padding: 3rem 0;
}

.print-only {
display: none;
}

@media print {
.header {
display: flex;
Expand All @@ -816,6 +821,14 @@ export default {
.header a::after {
content: '';
}

.print-hidden {
display: none !important;
}

.print-only {
display: initial !important;
}
}

@media only screen and (min-width: 1500px) {
Expand Down Expand Up @@ -860,6 +873,16 @@ export default {
float: right;
}

.ingredient-highlighted {
font-style: italic;
}

@media print {
.ingredient-highlighted {
font-style: initial;
}
}

.description {
font-style: italic;
white-space: pre-line;
Expand Down