From c0c250e041cdcdc6399e32176b56bae6c9b33309 Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Wed, 27 Dec 2023 11:01:17 +0300 Subject: [PATCH] deleted double field tags and correct show recipe --- resources/views/recipe/show.blade.php | 334 ++++++++++++-------------- 1 file changed, 155 insertions(+), 179 deletions(-) diff --git a/resources/views/recipe/show.blade.php b/resources/views/recipe/show.blade.php index 976789b..f05a233 100644 --- a/resources/views/recipe/show.blade.php +++ b/resources/views/recipe/show.blade.php @@ -2,206 +2,182 @@ @section('page_title', 'Recipe ' . $recipe->title) @php -$recipeViewsCount = views($recipe) -->unique() -->count(); -$isRecipeNavigationUrlActive = true; + $recipeViewsCount = views($recipe) + ->unique() + ->count(); + $isRecipeNavigationUrlActive = true; @endphp @section('main_section') -
-
-
- - Рецепты - -
-
- {{ $recipeViewsCount }} +
+
+
+ + Рецепты + +
+
+ {{ $recipeViewsCount }} +
+
+ @livewire('recipe.like-count', ['recipe' => $recipe]) +
+
+ {{ $recipe->comments_count }} +
-
- @livewire('recipe.like-count', ['recipe' => $recipe]) -
-
- {{ $recipe->comments_count }} -
-
-
-
- {{ $author['name'] }} -
-
- @empty($author->profile_photo_path) - thumb - @else - thumb - @endempty +
+
+ {{ $author['name'] }} +
+
+ @empty($author->profile_photo_path) + thumb + @else + thumb + @endempty +
-
-
-
-
-
-
-
- recipe -
-
-
-

- {{ $recipe->title }} -

+
+
+
+
+
+
+ recipe +
+
+
+

+ {{ $recipe->title }} +

-
- +
+ -
    -
  • - Редактировать -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • - {{--
  • --}} - {{--
    ID: 2jkfk45JG
    --}} - {{--
  • --}} -
+
    +
  • + Редактировать +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+ +
- -
-
-
{{ __('recipe.t' . $recipe->cooking_time . 'm') }}
-
{{ $recipe->steps->count() }} этапов
-
-

{!! $recipe->description !!}

- @if (strlen(trim($recipe->video_url)) > 4) - Посмотреть рецепт на YouTube - @endif -
-
-
-
-
- ПРОДУКТЫ: -
-
    - @foreach ($recipe->ingredients as $ingredient) - @php - $localizedUnit = isset($ingredient['unit']) && mb_strlen($ingredient['unit']) > 1 ? $ingredient['unit'] : 'gr'; - @endphp - @if (mb_strlen($ingredient['name']) > 1) -
  • {{ $ingredient['name'] }} - {{ $ingredient['portion'] }} - {{ __('recipe.' . $localizedUnit) }} -
  • +
    +
    {{ __('recipe.t' . $recipe->cooking_time . 'm') }}
    +
    {{ $recipe->steps->count() }} этапов
    +
    +

    {!! $recipe->description !!}

    + @if (strlen(trim($recipe->video_url)) > 4) + Посмотреть рецепт на YouTube @endif - @endforeach -
-
-
-
- ЦЕННОСТЬ:
-
    -
  • WIP
  • - {{-- +
+
+
+
+ ПРОДУКТЫ: +
+
    + @foreach ($recipe->ingredients as $ingredient) + @php + $localizedUnit = isset($ingredient['unit']) && mb_strlen($ingredient['unit']) > 1 ? $ingredient['unit'] : 'gr'; + @endphp + @if (mb_strlen($ingredient['name']) > 1) +
  • {{ $ingredient['name'] }} - {{ $ingredient['portion'] }} + {{ __('recipe.' . $localizedUnit) }} +
  • + @endif + @endforeach +
+
+ + {{--
--}} + {{--
--}} + {{-- ЦЕННОСТЬ: --}} + {{--
--}} + {{--
    --}} + {{--
  • WIP
  • --}} + {{--
  • Калории: 139.9 ккал
  • Белки: 20.4 гр
  • Жиры: 5.7 гр
  • Углеводы: 1.8 гр
  • --}} -
-
-
-
- ЦЕННОСТЬ: -
-
- @foreach ($recipe->tags->unique() as $curTag) - {{ $curTag->name }} - @endforeach + {{-- --}} + {{--
--}} + +
+
+ ЦЕННОСТЬ: +
+
+ @foreach ($recipe->tags->unique() as $curTag) + {{ $curTag->name }} + @endforeach +
-
-
-
-
-
-
-

- ПОШАГОВЫЙ ФОТО РЕЦЕПТ - {{ $recipe->title }} -

-
    - @foreach ($recipe->steps as $step) -
  1. -
    - @if (isset($step['image']) && is_string($step['image']) && strlen($step['image']) > 4) - step - @endif -
    -
    - - {!! $step['description'] !!} - -
    -
  2. - @endforeach +
+
+
+

+ ПОШАГОВЫЙ ФОТО РЕЦЕПТ - {{ $recipe->title }} +

+
    + @foreach ($recipe->steps as $step) +
  1. +
    + @if (isset($step['image']) && is_string($step['image']) && strlen($step['image']) > 4) + step + @endif +
    +
    + + {!! $step['description'] !!} + +
    +
  2. + @endforeach +
+
+
- {{--
  • -
    - step -
    -
    - Режем куриную грудку тонкими ломтиками. -
    -
  • -
  • -
    - step -
    -
    -

    - На край каждого кусочка филе кладем 1 ст. л. тертого сыра и порезанную зелень. -

    -

    - Формируем рулетик из куриного филе с сыром и зеленью, подворачивая с боков, чтобы сыр при приготовлении не вытек. Скрепляем края половинками зубочисток. -

    -
    -
  • --}} - -
    -
    +
    +
    +

    + ОТЗЫВЫ +

    -
    -
    -

    - ОТЗЫВЫ -

    - - @livewire('recipe.comment.show', ['recipe' => $recipe]) - @auth - @livewire('recipe.comment.create', ['recipe' => $recipe, 'user' => Auth::user()]) - @endauth -
    -
    + @livewire('recipe.comment.show', ['recipe' => $recipe]) + @auth + @livewire('recipe.comment.create', ['recipe' => $recipe, 'user' => Auth::user()]) + @endauth +
    +
    @endsection -