Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some issues to improve the print output #1723

Merged
merged 1 commit into from
Jun 14, 2022
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
3 changes: 2 additions & 1 deletion cookbook/static/themes/tandoor.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -9548,7 +9548,8 @@ a.text-dark:focus, a.text-dark:hover {
@media print {
*, :after, :before {
text-shadow: none !important;
box-shadow: none !important
box-shadow: none !important;
background-color: transparent !important;
}

a:not(.btn) {
Expand Down
22 changes: 17 additions & 5 deletions vue/src/components/CustomInputSpinButton.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
// code taken from https://github.com/bootstrap-vue/bootstrap-vue/issues/4977#issuecomment-740215609 and modified
<template>
<b-input-group>
<b-input-group-prepend>
<b-input-group-prepend class="d-print-none">
<b-button variant="outline-primary" class="py-0 px-2" size="sm" @click="valueChange(value - 1)">
<b-icon icon="dash" font-scale="1.6" />
</b-button>
</b-input-group-prepend>

<b-form-input
style="text-align: right; border-width: 0px; border: none; padding: 0px; padding-left: 0.5vw; padding-right: 8px; width: 50px"
variant="outline-primary"
:size="size"
:value="value"
type="number"
min="0"
class="border-secondary text-center"
class="custom-spin-input"
number
@update="valueChange"
/>

<b-input-group-append>
<b-input-group-append class="d-print-none">
<b-button variant="outline-primary" class="py-0 px-2" size="sm" @click="valueChange(value + 1)">
<b-icon icon="plus" font-scale="1.6" />
</b-button>
Expand Down Expand Up @@ -71,6 +70,12 @@ export default {
</script>

<style scoped>
input.custom-spin-input {
text-align: center;
width: 50px;
border-radius: 0 !important;
}

/* Remove up and down arrows inside number input */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
Expand All @@ -83,4 +88,11 @@ input::-webkit-inner-spin-button {
input[type=number] {
-moz-appearance: textfield;
}
</style>

@media print {
input.custom-spin-input {
background-color: transparent !important;
border: none !important;
}
}
</style>
2 changes: 1 addition & 1 deletion vue/src/components/IngredientComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>

<template v-else>
<td class="d-print-non" v-if="detailed && !show_shopping" @click="done">
<td class="d-print-none" v-if="detailed && !show_shopping" @click="done">
<i class="far fa-check-circle text-success" v-if="ingredient.checked"></i>
<i class="far fa-check-circle text-primary" v-if="!ingredient.checked"></i>
</td>
Expand Down
2 changes: 1 addition & 1 deletion vue/src/components/IngredientsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h4 class="card-title"><i class="fas fa-pepper-hot"></i> {{ $t("Ingredients") }}</h4>
</div>
<div class="col col-md-6 text-right" v-if="header">
<h4>
<h4 class="d-print-none">
<i v-if="show_shopping && ShoppingRecipes.length > 0" class="fas fa-trash text-danger px-2" @click="saveShopping(true)"></i>
<i v-if="show_shopping" class="fas fa-save text-success px-2" @click="saveShopping()"></i>
<i class="fas fa-shopping-cart px-2" @click="getShopping()"></i>
Expand Down