Skip to content

Commit

Permalink
fix: Added Nutrients Suffix to the PrintView and some formatting to t…
Browse files Browse the repository at this point in the history
…hat (#4493)
  • Loading branch information
shethshlok authored Nov 1, 2024
1 parent 446755f commit eb34ef0
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions frontend/components/Domain/Recipe/RecipePrintView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<tr v-for="(value, key) in recipe.nutrition" :key="key">
<template v-if="value">
<td>{{ labels[key].label }}</td>
<td>{{ value || '-' }}</td>
<td>{{ value ? (labels[key].suffix ? `${value} ${labels[key].suffix}` : value) : '-' }}</td>
</template>
</tr>
</tbody>
Expand Down Expand Up @@ -322,10 +322,32 @@ li {
}
.nutrition-table {
width: 25%;
max-width: 80%;
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 {
padding: 2px;
text-align: left;
Expand Down

0 comments on commit eb34ef0

Please sign in to comment.