From 04631d2106c734425dbcac175b5c195e4f3eb758 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Mon, 8 Mar 2021 08:35:00 -0800 Subject: [PATCH] Adjust recipe show page styles --- resources/views/recipes/show.blade.php | 137 +++++++++++++------------ 1 file changed, 73 insertions(+), 64 deletions(-) diff --git a/resources/views/recipes/show.blade.php b/resources/views/recipes/show.blade.php index 314493e..6bc28fd 100644 --- a/resources/views/recipes/show.blade.php +++ b/resources/views/recipes/show.blade.php @@ -18,27 +18,27 @@ -
+
- @if($recipe->description) -
- {!! $recipe->description !!} + @if($recipe->time_total > 0) +
+
+

Prep time

+

{{ $recipe->time_prep }} minutes

+
+
+

Active time

+

{{ $recipe->time_active }} minutes

+
+
+

Total time

+

{{ $recipe->time_total }} minutes

+
@endif - @if($recipe->time_total > 0) -
-
-

Prep time

-

{{ $recipe->time_prep }} minutes

-
-
-

Active time

-

{{ $recipe->time_active }} minutes

-
-
-

Total time

-

{{ $recipe->time_total }} minutes

-
+ @if($recipe->description) +
+ {!! $recipe->description !!}
@endif
@@ -47,28 +47,42 @@ [toggle nutrients] -
    - @foreach($recipe->ingredientAmounts as $ia) -
  • - {{ \App\Support\Number::fractionStringFromFloat($ia->amount) }} - @if($ia->unitFormatted){{ $ia->unitFormatted }}@endif - @if($ia->ingredient->type === \App\Models\Recipe::class) - - {{ $ia->ingredient->name }} - - @else - {{ $ia->ingredient->name }}@if($ia->ingredient->detail), {{ $ia->ingredient->detail }}@endif - @endif - @if($ia->detail){{ $ia->detail }}@endif -
    {{ $ia->nutrients_summary }}
    -
  • - @endforeach -
+
+
    + @foreach($recipe->ingredientAmounts as $ia) +
  • + + {{ \App\Support\Number::fractionStringFromFloat($ia->amount) }} + @if($ia->unitFormatted){{ $ia->unitFormatted }}@endif + @if($ia->ingredient->type === \App\Models\Recipe::class) + + {{ $ia->ingredient->name }} + + @else + {{ $ia->ingredient->name }}@if($ia->ingredient->detail), {{ $ia->ingredient->detail }}@endif + @endif + @if($ia->detail){{ $ia->detail }}@endif +
    {{ $ia->nutrients_summary }}
    +
    +
  • + @endforeach +
+
+
+
+

Steps

+
+
    + @foreach($recipe->steps as $step) +
  1. {{ $step->step }}
  2. + @endforeach +
+
-
+ @if($recipe->source) +
+

Source

+ @if(filter_var($recipe->source, FILTER_VALIDATE_URL)) + {{ $recipe->source }} + @else + {{ $recipe->source }} + @endif +
+ @endif + @if(!$recipe->tags->isEmpty()) +
+

Tags

+
+ @foreach($recipe->tags as $tag) + {{ $tag->name }} + @endforeach +
+
+ @endif
-
-

Steps

-
-
    - @foreach($recipe->steps as $step) -
  1. {{ $step->step }}
  2. - @endforeach -
-
-
- @if($recipe->source) - - @endif - @if(!$recipe->tags->isEmpty()) -
-

Tags:

- {{ implode(', ', $recipe->tags->pluck('name')->all()) }} -
- @endif