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

fix: Added Nutrients Suffix to the PrintView and some formatting to that (#4493)

This commit is contained in:
Shlok Sheth 2024-11-01 15:12:25 -07:00 committed by GitHub
parent 446755f678
commit eb34ef0156
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;