mirror of https://github.com/kcal-app/kcal.git
Display recipe volume where applicable
This commit is contained in:
parent
fb3fa3dd1d
commit
e8f2ed8108
|
|
@ -16,7 +16,10 @@
|
|||
<a x-bind:href="recipe.showUrl"
|
||||
class="hover:text-gray-600" x-text="recipe.name"></a>
|
||||
</h1>
|
||||
<h2 class="leading-snug" x-text="`${recipe.servings} servings`"></h2>
|
||||
<h2 class="leading-snug">
|
||||
<span x-text="`${recipe.servings} servings`"></span>
|
||||
<span x-show="recipe.volume" x-text="` / ${recipe.volumeFormatted} cups`"></span>
|
||||
</h2>
|
||||
<section class="flex justify-between items-end font-extrabold" x-show="recipe.serving_weight">
|
||||
<h1>Serving weight</h1>
|
||||
<div x-text="`${recipe.serving_weight}g`"></div>
|
||||
|
|
|
|||
|
|
@ -108,7 +108,12 @@
|
|||
<aside class="flex flex-col space-y-4 mb-8 md:mt-0 sm:max-w-xs">
|
||||
<div class="p-1 border-2 border-black font-sans md:w-72">
|
||||
<div class="text-3xl font-extrabold leading-none">Nutrition Facts</div>
|
||||
<div class="leading-snug">{{ $recipe->servings }} {{ \Illuminate\Support\Str::plural('serving', $recipe->servings ) }}</div>
|
||||
<div class="leading-snug">
|
||||
{{ $recipe->servings }} {{ \Illuminate\Support\Str::plural('serving', $recipe->servings ) }}
|
||||
@if($recipe->volume)
|
||||
/ {{ $recipe->volume_formatted }} {{ \Illuminate\Support\Str::plural('cup', $recipe->volume ) }}
|
||||
@endif
|
||||
</div>
|
||||
@if($recipe->serving_weight)
|
||||
<div class="flex justify-between items-end font-extrabold">
|
||||
<div>Serving weight</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue