From 352483687826d45ff620406cd3119ca90fc13163 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Fri, 5 Mar 2021 20:57:37 -0800 Subject: [PATCH] Add page titles --- .../views/auth/confirm-password.blade.php | 1 + .../views/auth/forgot-password.blade.php | 1 + resources/views/auth/login.blade.php | 1 + resources/views/auth/register.blade.php | 1 + resources/views/auth/reset-password.blade.php | 1 + resources/views/auth/verify-email.blade.php | 1 + resources/views/foods/delete.blade.php | 81 +++--- resources/views/foods/edit.blade.php | 6 +- resources/views/foods/index.blade.php | 109 ++++---- resources/views/foods/show.blade.php | 153 +++++------ resources/views/goals/delete.blade.php | 23 +- resources/views/goals/edit.blade.php | 120 ++++----- resources/views/goals/index.blade.php | 45 ++-- resources/views/goals/show.blade.php | 1 + .../create-from-nutrients.blade.php | 103 ++++---- .../views/journal-entries/create.blade.php | 45 ++-- .../views/journal-entries/delete.blade.php | 47 ++-- .../views/journal-entries/index.blade.php | 247 +++++++++--------- resources/views/layouts/guest.blade.php | 2 +- resources/views/recipes/delete.blade.php | 1 + resources/views/recipes/edit.blade.php | 186 ++++++------- resources/views/recipes/index.blade.php | 101 +++---- 22 files changed, 647 insertions(+), 629 deletions(-) diff --git a/resources/views/auth/confirm-password.blade.php b/resources/views/auth/confirm-password.blade.php index 264c930..4a7248d 100644 --- a/resources/views/auth/confirm-password.blade.php +++ b/resources/views/auth/confirm-password.blade.php @@ -1,4 +1,5 @@ + Confirm Password diff --git a/resources/views/auth/forgot-password.blade.php b/resources/views/auth/forgot-password.blade.php index 2c3bcd5..832a20f 100644 --- a/resources/views/auth/forgot-password.blade.php +++ b/resources/views/auth/forgot-password.blade.php @@ -1,4 +1,5 @@ + Forgot Password diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 487703e..d6dcd8a 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,4 +1,5 @@ + Login diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 7995a0c..8544a05 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,4 +1,5 @@ + Register diff --git a/resources/views/auth/reset-password.blade.php b/resources/views/auth/reset-password.blade.php index 5c1dbbd..9040d2e 100644 --- a/resources/views/auth/reset-password.blade.php +++ b/resources/views/auth/reset-password.blade.php @@ -1,4 +1,5 @@ + Reset Password diff --git a/resources/views/auth/verify-email.blade.php b/resources/views/auth/verify-email.blade.php index cdec0c1..5fdf2e7 100644 --- a/resources/views/auth/verify-email.blade.php +++ b/resources/views/auth/verify-email.blade.php @@ -1,4 +1,5 @@ + Verify Email diff --git a/resources/views/foods/delete.blade.php b/resources/views/foods/delete.blade.php index 64b0690..9d7c26a 100644 --- a/resources/views/foods/delete.blade.php +++ b/resources/views/foods/delete.blade.php @@ -1,49 +1,50 @@ + Delete {{ $food->name }}

Delete {{ $food->name }}?

- @method('delete') - @csrf -
-
Are you sure what to delete {{ $food->name }}?
-
+ @method('delete') + @csrf +
+
Are you sure what to delete {{ $food->name }}?
+
+ @if($food->detail) +
+ Detail: + {{ $food->detail }} +
+ @endif + @if($food->brand) +
+ Brand: + {{ $food->brand }} +
+ @endif + @if(!$food->ingredientAmountRelationships->isEmpty()) +
+
+ + +
- - Yes, delete - - - No, do not delete - +
Deleting this food will also remove it from the following recipes:
+
+ + @endif +
+
+ + Yes, delete + + + No, do not delete + diff --git a/resources/views/foods/edit.blade.php b/resources/views/foods/edit.blade.php index 9643fae..888f002 100644 --- a/resources/views/foods/edit.blade.php +++ b/resources/views/foods/edit.blade.php @@ -1,8 +1,8 @@ + {{ $title = ($food->exists ? "Edit {$food->name}" : 'Add Food') }} + {{ $title }} -

- {{ ($food->exists ? "Edit {$food->name}" : 'Add Food') }} -

+

{{ $title }}

@if ($food->exists)@method('put')@endif diff --git a/resources/views/foods/index.blade.php b/resources/views/foods/index.blade.php index ab041b1..5da3d76 100644 --- a/resources/views/foods/index.blade.php +++ b/resources/views/foods/index.blade.php @@ -1,4 +1,5 @@ + Foods

Foods

@@ -11,58 +12,58 @@
- - - - + + + +
diff --git a/resources/views/foods/show.blade.php b/resources/views/foods/show.blade.php index 09eabf0..6598735 100644 --- a/resources/views/foods/show.blade.php +++ b/resources/views/foods/show.blade.php @@ -1,4 +1,5 @@ + {{ $food->name }}

@@ -23,81 +24,81 @@

-
-
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
-
-
-
-
- @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 -
+
+
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
+
+
+
+
+ @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 +
+
diff --git a/resources/views/goals/delete.blade.php b/resources/views/goals/delete.blade.php index 9712388..1647d08 100644 --- a/resources/views/goals/delete.blade.php +++ b/resources/views/goals/delete.blade.php @@ -1,19 +1,20 @@ + Delete Goal

Delete {{ $goal->goal }} goal?

- @method('delete') - @csrf -
- Are you sure what to delete your {{ $goal->summary }} goal? -
- - Yes, delete - - No, do not delete - + @method('delete') + @csrf +
+ Are you sure what to delete your {{ $goal->summary }} goal? +
+ + Yes, delete + + No, do not delete +
diff --git a/resources/views/goals/edit.blade.php b/resources/views/goals/edit.blade.php index 7853227..8fc8018 100644 --- a/resources/views/goals/edit.blade.php +++ b/resources/views/goals/edit.blade.php @@ -1,70 +1,70 @@ + {{ $title = ($goal->exists ? 'Edit' : 'Add') . ' Goal' }} + {{ $title }} -

- {{ ($goal->exists ? 'Edit' : 'Add') }} Goal -

+

{{ $title }}

- @if ($goal->exists)@method('put')@endif - @csrf -
-
- -
- - -
+ @if ($goal->exists)@method('put')@endif + @csrf +
+
+ +
+ + +
- -
- - -
+ +
+ + +
- -
- - - -
+ +
+ + + +
- -
- - - -
+ +
+ + + +
- -
- - -
-
-
+ +
+ + +
+
+
-
- - {{ ($goal->exists ? 'Save' : 'Add') }} - -
-
+
+ + {{ ($goal->exists ? 'Save' : 'Add') }} + +
+
diff --git a/resources/views/goals/index.blade.php b/resources/views/goals/index.blade.php index 8e9d031..90537a2 100644 --- a/resources/views/goals/index.blade.php +++ b/resources/views/goals/index.blade.php @@ -1,8 +1,9 @@ + My Goals - {{ $date->format('D, j M Y') }}

-
{{ Auth::user()->name }}'s Goals
+
My Goals
- @forelse($goals['present'] as $goal) -
- - - - - - - - - - - -
{{ $goal->summary }}
-
- @empty -
No goals set.
- @endforelse -
+ @forelse($goals['present'] as $goal) +
+ + + + + + + + + + + +
{{ $goal->summary }}
+
+ @empty +
No goals set.
+ @endforelse +
diff --git a/resources/views/goals/show.blade.php b/resources/views/goals/show.blade.php index 65450b7..3605ff9 100644 --- a/resources/views/goals/show.blade.php +++ b/resources/views/goals/show.blade.php @@ -1,4 +1,5 @@ + Goal

{{ $goal->summary }} diff --git a/resources/views/journal-entries/create-from-nutrients.blade.php b/resources/views/journal-entries/create-from-nutrients.blade.php index aa9cdda..82d95b1 100644 --- a/resources/views/journal-entries/create-from-nutrients.blade.php +++ b/resources/views/journal-entries/create-from-nutrients.blade.php @@ -1,4 +1,5 @@ + Add Entry

Add Entry

@@ -8,63 +9,63 @@
- @csrf -
- -
- + @csrf +
+ +
+ - -
+ +
- -
- + +
+ - - - -
+ + + +
- -
- + +
+ - -
-
+ +
+
-
- @foreach (\App\Support\Nutrients::all()->sortBy('weight') as $nutrient) - -
- +
+ @foreach (\App\Support\Nutrients::all()->sortBy('weight') as $nutrient) + +
+ - -
- @endforeach -
+ +
+ @endforeach +
-
- Add Entry -
-
+
+ Add Entry +
+
diff --git a/resources/views/journal-entries/create.blade.php b/resources/views/journal-entries/create.blade.php index daea925..af31486 100644 --- a/resources/views/journal-entries/create.blade.php +++ b/resources/views/journal-entries/create.blade.php @@ -1,4 +1,5 @@ + Add Entries

Add Entries

@@ -8,28 +9,28 @@
- @csrf -
- @foreach($ingredients as $ingredient) - @include('journal-entries.partials.entry-item-input', $ingredient) - @endforeach - - - - - - -
-
- - -
- Add entries -
-
-
+ @csrf +
+ @foreach($ingredients as $ingredient) + @include('journal-entries.partials.entry-item-input', $ingredient) + @endforeach + + + + + + +
+
+ + +
+ Add entries +
+
+ @once @push('scripts') diff --git a/resources/views/journal-entries/delete.blade.php b/resources/views/journal-entries/delete.blade.php index 010e5d8..3ef7108 100644 --- a/resources/views/journal-entries/delete.blade.php +++ b/resources/views/journal-entries/delete.blade.php @@ -1,31 +1,32 @@ + Delete Entry

Delete {{ $entry->summary }}?

- @method('delete') - @csrf -
Are you sure what to delete this journal entry?
-
-
- Summay: - {{ $entry->summary }} -
-
- Date: - {{ $entry->date->format('D, j M Y') }} -
-
- Meal: - {{ $entry->meal }} -
-
- - Yes, delete - - No, do not delete -
+ @method('delete') + @csrf +
Are you sure what to delete this journal entry?
+
+
+ Summay: + {{ $entry->summary }} +
+
+ Date: + {{ $entry->date->format('D, j M Y') }} +
+
+ Meal: + {{ $entry->meal }} +
+
+ + Yes, delete + + No, do not delete +
diff --git a/resources/views/journal-entries/index.blade.php b/resources/views/journal-entries/index.blade.php index e9c8c56..e5b5954 100644 --- a/resources/views/journal-entries/index.blade.php +++ b/resources/views/journal-entries/index.blade.php @@ -1,8 +1,9 @@ + My Journal - {{ $date->format('D, j M Y') }}

-
{{ Auth::user()->name }}'s Journal
+
My Journal
-
-
-

{{ $date->format('D, j M Y') }}

-
{{ $entries->count() }} {{ \Illuminate\Support\Pluralizer::plural('entry', $entries->count()) }}
-
-
% Daily goal
-
-
- Calories - {{ number_format($sums['calories']) }} -
-
- {{ $dailyGoals['calories'] ?? 'N/A' }} -
-
-
-
- Fat - {{ number_format($sums['fat']) }}g -
-
- {{ $dailyGoals['fat'] ?? 'N/A' }} -
-
-
-
- Cholesterol - {{ number_format($sums['cholesterol']) }}mg -
-
- {{ $dailyGoals['cholesterol'] ?? 'N/A' }} -
-
-
-
- Sodium - {{ number_format($sums['sodium']) }}mg -
-
- {{ $dailyGoals['sodium'] ?? 'N/A' }} -
-
-
-
- Carbohydrates - {{ number_format($sums['carbohydrates']) }}g -
-
- {{ $dailyGoals['carbohydrates'] ?? 'N/A' }} -
-
-
-
- Protein - {{ number_format($sums['protein']) }}g -
-
- {{ $dailyGoals['protein'] ?? 'N/A' }} -
-
+
+
+

{{ $date->format('D, j M Y') }}

+
{{ $entries->count() }} {{ \Illuminate\Support\Pluralizer::plural('entry', $entries->count()) }}
+
+
% Daily goal
+
+
+ Calories + {{ number_format($sums['calories']) }} +
+
+ {{ $dailyGoals['calories'] ?? 'N/A' }} +
+
+
+
+ Fat + {{ number_format($sums['fat']) }}g +
+
+ {{ $dailyGoals['fat'] ?? 'N/A' }} +
+
+
+
+ Cholesterol + {{ number_format($sums['cholesterol']) }}mg +
+
+ {{ $dailyGoals['cholesterol'] ?? 'N/A' }} +
+
+
+
+ Sodium + {{ number_format($sums['sodium']) }}mg +
+
+ {{ $dailyGoals['sodium'] ?? 'N/A' }} +
+
+
+
+ Carbohydrates + {{ number_format($sums['carbohydrates']) }}g +
+
+ {{ $dailyGoals['carbohydrates'] ?? 'N/A' }} +
+
+
+
+ Protein + {{ number_format($sums['protein']) }}g +
+
+ {{ $dailyGoals['protein'] ?? 'N/A' }} +
+
+
+

+ @forelse($entries->where('meal', $meal) as $entry) +
+ {{ $entry->summary }} +
+ +
+ nutrients: + @foreach(\App\Support\Nutrients::all()->sortBy('weight') as $nutrient) + {{ round($entry->{$nutrient['value']}, 2) }}{{ $nutrient['unit'] }} + {{ $nutrient['value'] }}@if(!$loop->last), @endif + @endforeach +
+ @if($entry->foods()->exists()) +
+ foods: + @foreach($entry->foods as $food) + + {{ $food->name }}@if(!$loop->last), @endif + @endforeach +
+ @endif + @if($entry->recipes()->exists()) +
+ recipes: + @foreach($entry->recipes as $recipe) + + {{ $recipe->name }}@if(!$loop->last), @endif + @endforeach +
+ @endif +
+
+ @empty + No entries. + @endforelse +
+ @endforeach +

+

diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.php index 8e1dc5f..69c9d67 100644 --- a/resources/views/layouts/guest.blade.php +++ b/resources/views/layouts/guest.blade.php @@ -5,7 +5,7 @@ - {{ config('app.name', 'Laravel') }} + {{ $title }} - {{ config('app.name', 'Laravel') }} diff --git a/resources/views/recipes/delete.blade.php b/resources/views/recipes/delete.blade.php index 5ceb708..de20ea7 100644 --- a/resources/views/recipes/delete.blade.php +++ b/resources/views/recipes/delete.blade.php @@ -1,4 +1,5 @@ + Delete {{ $recipe->name }}

Delete {{ $recipe->name }}? diff --git a/resources/views/recipes/edit.blade.php b/resources/views/recipes/edit.blade.php index 55a6e75..8607a48 100644 --- a/resources/views/recipes/edit.blade.php +++ b/resources/views/recipes/edit.blade.php @@ -1,112 +1,112 @@ + {{ $title = ($recipe->exists ? "Edit {$recipe->name}" : 'Add Recipe') }} + {{ $title }} -

- {{ ($recipe->exists ? "Edit {$recipe->name}" : 'Add Recipe') }} -

+

{{ $title }}

- @if ($recipe->exists)@method('put')@endif - @csrf -
- -
- + @if ($recipe->exists)@method('put')@endif + @csrf +
+ +
+ - -
+ +
- -
- + +
+ - -
+ +
- -
- + +
+ - -
-
-
- -
- + +
+
+
+ +
+ - -
+ +
- -
- + +
+ - -
+ +
- - -
+ + +
- -

Ingredients

-
- @forelse($ingredients as $ingredient) - @include('recipes.partials.ingredient-input', $ingredient) - @empty - @include('recipes.partials.ingredient-input') - @endforelse - - - - - - -
+ +

Ingredients

+
+ @forelse($ingredients as $ingredient) + @include('recipes.partials.ingredient-input', $ingredient) + @empty + @include('recipes.partials.ingredient-input') + @endforelse + + + + + + +
- -

Steps

-
- @forelse($steps as $step) - @include('recipes.partials.step-input', $step) - @empty - @include('recipes.partials.step-input') - @endforelse - - - - - - -
+ +

Steps

+
+ @forelse($steps as $step) + @include('recipes.partials.step-input', $step) + @empty + @include('recipes.partials.step-input') + @endforelse + + + + + + +
-
- - {{ ($recipe->exists ? 'Save' : 'Add') }} - -
-
+
+ + {{ ($recipe->exists ? 'Save' : 'Add') }} + +
+ @once @push('scripts') diff --git a/resources/views/recipes/index.blade.php b/resources/views/recipes/index.blade.php index cc54116..cbf3f57 100644 --- a/resources/views/recipes/index.blade.php +++ b/resources/views/recipes/index.blade.php @@ -1,4 +1,5 @@ + Recipes

Recipes

@@ -11,54 +12,54 @@
- - - - + + + +