mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-22 22:59:41 +02:00
fix: Added Nutrients Suffix to the PrintView and some formatting to that (#4493)
This commit is contained in:
parent
446755f678
commit
eb34ef0156
1 changed files with 24 additions and 2 deletions
|
@ -98,7 +98,7 @@
|
||||||
<tr v-for="(value, key) in recipe.nutrition" :key="key">
|
<tr v-for="(value, key) in recipe.nutrition" :key="key">
|
||||||
<template v-if="value">
|
<template v-if="value">
|
||||||
<td>{{ labels[key].label }}</td>
|
<td>{{ labels[key].label }}</td>
|
||||||
<td>{{ value || '-' }}</td>
|
<td>{{ value ? (labels[key].suffix ? `${value} ${labels[key].suffix}` : value) : '-' }}</td>
|
||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -322,10 +322,32 @@ li {
|
||||||
}
|
}
|
||||||
|
|
||||||
.nutrition-table {
|
.nutrition-table {
|
||||||
width: 25%;
|
max-width: 80%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nutrition-table th,
|
||||||
|
.nutrition-table td {
|
||||||
|
padding: 6px 10px;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: top;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nutrition-table th {
|
||||||
|
font-weight: bold;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nutrition-table td:first-child {
|
||||||
|
width: 70%;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nutrition-table td:last-child {
|
||||||
|
width: 30%;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
.nutrition-table td {
|
.nutrition-table td {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue