diff --git a/resources/views/foods/show.blade.php b/resources/views/foods/show.blade.php index 2a5de8e..427ad68 100644 --- a/resources/views/foods/show.blade.php +++ b/resources/views/foods/show.blade.php @@ -1,7 +1,12 @@ -

- {{ $food->name }} +

+
+ {{ $food->name }}@if($food->detail), {{ $food->detail }}@endif + @if($food->brand) +
{{ $food->brand }}
+ @endif +
@@ -21,66 +26,84 @@
- -

- {{ $food->name }}@if($food->detail), {{ $food->detail }}@endif -

- @if($food->brand) -
{{ $food->brand }}
- @endif -
-
Nutrition Facts
-
-
Serving size
-
- {{ $food->servingSizeFormatted }} - {{ $food->servingUnitFormatted ?? $food->name }} - ({{ $food->serving_weight }}g) +
+
+
Nutrition Facts
+
+
Serving size
+
+ {{ $food->servingSizeFormatted }} + {{ $food->servingUnitFormatted ?? $food->name }} + ({{ $food->serving_weight }}g) +
+
+
Amount per serving
+
+
Calories
+
{{ $food->calories }}
+
+
+
+
+
Total Fat
+
{{ $food->fat }}g
+
+
+
+
Cholesterol
+
{{ $food->cholesterol }}mg
+
+
+
+
Sodium
+
{{ $food->sodium }}mg
+
+
+
+
Total Carbohydrate
+
{{ $food->carbohydrates }}g
+
+
+
+
Protein
+
{{ $food->protein }}g
+
-
Amount per serving
-
-
Calories
-
{{ $food->calories }}
-
-
-
-
-
Total Fat
-
{{ $food->fat }}g
-
-
-
-
Cholesterol
-
{{ $food->cholesterol }}mg
-
-
-
-
Sodium
-
{{ $food->sodium }}mg
-
-
-
-
Total Carbohydrate
-
{{ $food->carbohydrates }}g
-
-
-
-
Protein
-
{{ $food->protein }}g
-
-
-
- @if($food->source) -
- Source: - @if(filter_var($food->source, FILTER_VALIDATE_URL)) - {{ $food->source }} - @else - {{ $food->source }} +
+ @if(!$food->tags->isEmpty()) +

Tags

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

Description

+
{{ $food->description }}
+ @endif + @if(!$food->ingredientAmountRelationships->isEmpty()) +

Recipes

+ + @endif + @if($food->source) +

Source

+
+ @if(filter_var($food->source, FILTER_VALIDATE_URL)) + {{ $food->source }} + @else + {{ $food->source }} + @endif +
@endif
- @endif +