forked from eatvio/eatvio-infra
WIP recipe
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
@tailwind base;
|
||||
/* @tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@tailwind utilities; */
|
||||
|
||||
[x-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.my-custom-tags .taggle_list {
|
||||
margin-top: -1.8em;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ $currentLocale = LaravelLocalization::getCurrentLocale();
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Auth</title>
|
||||
<title>{{env('HOME_PAGE_TITLE')}}</title>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
||||
</style>
|
||||
|
||||
@@ -16,8 +16,8 @@ $isDiary = Str::of($curUrl)->test('/\/diary/');
|
||||
<link type="text/css" rel="stylesheet" href="/css/liana_reset.css" />
|
||||
<style>@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');</style>
|
||||
<link type="text/css" rel="stylesheet" href="{{ mix('css/app.css') }}" />
|
||||
<link type="text/css" rel="stylesheet" href="/css/bootstrap.min.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/css/datepicker.min.css" />
|
||||
<!--link type="text/css" rel="stylesheet" href="/css/bootstrap.min.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/css/datepicker.min.css" /-->
|
||||
<link type="text/css" rel="stylesheet" href="/css/style.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/css/liana_style.css" />
|
||||
{{-- <script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script> --}}
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
@endisset
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-10 mb-3">
|
||||
<input type text wire:model="input_items" type="text" class="form-control py-3 w-100" placeholder="Содержание услуги" required=""></textarea>
|
||||
<input wire:model="input_items" type="text" class="form-control py-3 w-100" placeholder="Содержание услуги" required="" />
|
||||
</div>
|
||||
<div class="col-12 col-md-2 mb-3">
|
||||
<button wire:click="addPacketOption('packet1_options', 'packet1_options_input')" type="button" class="float-end btn btn-lg btn-primary btn-block px-5 fs-6 --f_bold">+</button>
|
||||
@@ -304,3 +304,4 @@
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
</a>
|
||||
<h1 class="diet__title">{{ __('recipe.adding') }}</h1>
|
||||
</div>
|
||||
<div action="#" class="diet__form">
|
||||
<div class="mb-4 fs-4_5">
|
||||
<div class="mb-2">{{ __('recipe.title') }}</div>
|
||||
<div class="diet__form">
|
||||
<div class="diet__form-row">
|
||||
<div class="label">{{ __('recipe.title') }}</div>
|
||||
<input wire:model="title" type="text" class="input" placeholder="Заголовок" />
|
||||
</div>
|
||||
<div class="mb-4 fs-4_5">
|
||||
<label>{{ __('recipe.type') }}</label>
|
||||
<div class="diet__form-row">
|
||||
<div class="label">{{ __('recipe.type') }}</div>
|
||||
<select wire:model="type" class="input">
|
||||
<option value="first_meals">{{ __('recipe.first_meals') }}</option>
|
||||
<option value="second_meals">{{ __('recipe.second_meals') }}</option>
|
||||
@@ -90,17 +90,50 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diet__form-column diet__form-column-xl">
|
||||
</div>
|
||||
<div class="diet__form-column diet__form-column-xl">
|
||||
@if(!empty($ingredients))
|
||||
<div class="content__table diet__form-row">
|
||||
<div class="content__table-wrapper">
|
||||
<table class="cabinet__table-content">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('recipe.name_of_product')}}</th>
|
||||
<th>{{ __('recipe.portion')}}</th>
|
||||
<th>{{ __('recipe.units')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ingredients as $ingredient)
|
||||
<tr>
|
||||
<td>{{ $ingredient['name'] }}</td>
|
||||
<td>{{ $ingredient['portion'] }}</td>
|
||||
<td>{{ __('recipe.' . $ingredient['unit']) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="diet__form-columns">
|
||||
<div class="diet__form-column diet__form-column-lg">
|
||||
<input type="text" name="product" class="input" placeholder="Введите название продукта">
|
||||
<input wire:model="ingredients_name" type="text" name="name" class="input" placeholder="Введите название продукта">
|
||||
</div>
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-adding">
|
||||
<div class="diet__form-column">
|
||||
<input type="num" name="ccal" class="input" placeholder="Порция">
|
||||
<button type="button" class="btn btn-primary icon-plus"></button>
|
||||
<input wire:model="ingredients_portion" type="num" name="portion" class="input" placeholder="Порция">
|
||||
<select wire:model="ingredients_unit" name="unit" class="input">
|
||||
<option value="gr">гр</option>
|
||||
<option value="teespoon">ч. ложек</option>
|
||||
<option value="tablespoon">ст. ложек</option>
|
||||
<option value="ml">мл</option>
|
||||
<option value="pcs">шт</option>
|
||||
<option value="clove">зубчик</option>
|
||||
<option value="to_taste">по вкусу</option>
|
||||
</select>
|
||||
<button wire:click="addIngredient" type="button" class="btn btn-primary icon-plus"></button>
|
||||
</div>
|
||||
<button type="button" class="icon-gear"></button>
|
||||
</div>
|
||||
@@ -131,7 +164,9 @@
|
||||
})
|
||||
.then( function(editor){
|
||||
editor.model.document.on('change:data', () => {
|
||||
$dispatch('input', editor.getData())
|
||||
console.log(editor.getData());
|
||||
// $dispatch('input', editor.getData())
|
||||
@this.set('description', editor.getData());
|
||||
})
|
||||
})
|
||||
.catch( error => {
|
||||
@@ -165,7 +200,7 @@
|
||||
@endif
|
||||
</span>
|
||||
</label>
|
||||
<textarea name="desc-step-1" class="textarea" placeholder="Введите описание шага"></textarea>
|
||||
<textarea name="desc-step-1" class="textarea" wire:model="steps.{{$i}}.description" id="step[{{$i}}][description]" placeholder="Введите описание шага"></textarea>
|
||||
<div class="diet__form-column">
|
||||
<button type="button" wire:click="removeStep({{$i}})" class="diet__form-add btn {{ $i == 0 ? 'btn-gray' : 'btn-primary' }}" @disabled($i == 0)>-</button>
|
||||
<button type="button" wire:click="addStep" class="diet__form-add btn btn-primary" data-bs-original-title="Добавить шаг">+</button>
|
||||
|
||||
@@ -1,30 +1,229 @@
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center flex-nowrap mb-4 px-4 py-3 --bg_white --shadow --radius --mw-1000 --f_bold --f_main overflow-x-xs-scroll">
|
||||
<a href="{{ route('recipe.index') }}" class="d-flex w-md-30 align-items-center --f_bold"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline --f_main">{{ __('recipe.my_recipes') }}</span></a>
|
||||
<div class="fs-5 text-center">
|
||||
<div class="--f_bolder">{{ __('recipe.editing') }}</div>
|
||||
<section class="py-5 diet" id="main">
|
||||
<div class="diet__container">
|
||||
<div class="diet__header">
|
||||
<a href="{{ route('recipe.index') }}" class="diet__back icon-arrow-short-left">
|
||||
<span>Мой блог</span>
|
||||
</a>
|
||||
<h1 class="diet__title">{{ __('recipe.editing') }}</h1>
|
||||
</div>
|
||||
<div class="d-none d-md-flex w-md-30"></div>
|
||||
</div>
|
||||
<div class="container mb-4 py-3 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<div class="mb-4 fs-4_5">
|
||||
<div class="mb-2">{{ __('recipe.title') }}</div>
|
||||
<input wire:model="title" type="text" class="form-control fs-4_5 py-3 w-100" placeholder="Заголовок" />
|
||||
</div>
|
||||
<div class="mb-4 fs-4_5">
|
||||
<label>{{ __('recipe.type') }}</label>
|
||||
<select wire:model="type" class="form-select mt-3 ps-4 pe-5 py-3 --f_bold">
|
||||
<option value="first_meals" @selected($type == 'first_meals')>{{ __('recipe.first_meals') }}</option>
|
||||
<option value="second_meals" @selected($type == 'second_meals')>{{ __('recipe.second_meals') }}</option>
|
||||
<option value="salads" @selected($type == 'salads')>{{ __('recipe.salads') }}</option>
|
||||
<option value="snacks" @selected($type == 'snacks')>{{ __('recipe.snacks') }}</option>
|
||||
<option value="sweets" @selected($type == 'sweets')>{{ __('recipe.sweets') }}</option>
|
||||
<option value="drinks" @selected($type == 'drinks')>{{ __('recipe.drinks') }}</option>
|
||||
<option value="other" @selected($type == 'other')>{{ __('recipe.other') }}</option>
|
||||
</select>
|
||||
<div class="diet__form">
|
||||
<div class="diet__form-row">
|
||||
<label class="label">{{ __('recipe.title') }}</label>
|
||||
<input wire:model="title" type="text" class="input" placeholder="Заголовок" />
|
||||
</div>
|
||||
<div class="diet__form-row">
|
||||
<label class="label">{{ __('recipe.type') }}</label>
|
||||
<select wire:model="type" class="input">
|
||||
<option value="first_meals" @selected($type == 'first_meals')>{{ __('recipe.first_meals') }}</option>
|
||||
<option value="second_meals" @selected($type == 'second_meals')>{{ __('recipe.second_meals') }}</option>
|
||||
<option value="salads" @selected($type == 'salads')>{{ __('recipe.salads') }}</option>
|
||||
<option value="snacks" @selected($type == 'snacks')>{{ __('recipe.snacks') }}</option>
|
||||
<option value="sweets" @selected($type == 'sweets')>{{ __('recipe.sweets') }}</option>
|
||||
<option value="drinks" @selected($type == 'drinks')>{{ __('recipe.drinks') }}</option>
|
||||
<option value="other" @selected($type == 'other')>{{ __('recipe.other') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="diet__form-row">
|
||||
<div class="diet__form-columns lg-columns">
|
||||
<div class="diet__form-column">
|
||||
<div class="label">{{ __('recipe.picture') }}</div>
|
||||
<label class="file">
|
||||
<input type="file" wire:model="image" name="file" class="file__input hidden" hidden="">
|
||||
<span class="file__content">
|
||||
<span class="file__formats">
|
||||
@if(is_null($image))
|
||||
<img src="/img/formats-2.svg" alt="formats">
|
||||
@else
|
||||
<img src="{{ is_string($image) ? Storage::url($image) : $image->temporaryUrl() }}" />
|
||||
@endif
|
||||
</span>
|
||||
<span class="file__title">
|
||||
@if(is_null($image))
|
||||
Нажмите для выбора или перетащите изображание
|
||||
@endif
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
@error('image') <span class="error">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<div class="diet__form-column diet__form-column-lg">
|
||||
<div class="diet__form-row">
|
||||
<div class="label">
|
||||
Тип записи
|
||||
</div>
|
||||
<div class="diary__stats-tablist" role="tablist" aria-labelledby="label">
|
||||
<button class="btn" role="tab" type="button" id="tab-1" aria-selected="true" aria-controls="tabpanel-1">Рецепт</button>
|
||||
<button class="btn" role="tab" type="button" id="tab-2" aria-selected="false" aria-controls="tabpanel-2" tabindex="-1">Cтатья</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabpanel" role="tabpanel" id="tabpanel-1" tabindex="0" aria-labelledby="tab-1">
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-row">
|
||||
<div class="label">{{ __('recipe.cooking_time') }}</div>
|
||||
<div class="dropdown" x-data="{ open: false }" >
|
||||
<button
|
||||
type="button"
|
||||
:class="open ? 'dropdown__button active' : 'dropdown__button'"
|
||||
x-on:click="open = ! open">
|
||||
{{ __('recipe.t' . $cooking_time . 'm') }}
|
||||
</button>
|
||||
<ul :class="open ? 'dropdown__list visible' : 'dropdown__list'">
|
||||
<li wire:click="$set('cooking_time','10')" @click="open = !open" :class="$wire.cooking_time =='10'? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.t10m') }}</li>
|
||||
<li wire:click="$set('cooking_time','20')" @click="open = !open" :class="$wire.cooking_time =='20' ? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.t20m') }}</li>
|
||||
<li wire:click="$set('cooking_time','30')" @click="open = !open" :class="$wire.cooking_time =='30' ? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.t30m') }}</li>
|
||||
<li wire:click="$set('cooking_time','60')" @click="open = !open" :class="$wire.cooking_time =='60' ? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.t60m') }}</li>
|
||||
<li wire:click="$set('cooking_time','120')" @click="open = !open" :class="$wire.cooking_time =='120' ? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.t120m') }}</li>
|
||||
<li wire:click="$set('cooking_time','14400')" @click="open = !open" :class="$wire.cooking_time =='14400' ? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.t14400m') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-row">
|
||||
<div class="label">{{ __('recipe.record_state') }}</div>
|
||||
<div class="dropdown" x-data="{ open: false }">
|
||||
<button type="button"
|
||||
:class="open ? 'dropdown__button active' : 'dropdown__button'"
|
||||
x-on:click="open = ! open"
|
||||
>{{ $state == 'active' ? __('recipe.record_state_active') : __('recipe.record_state_not_active') }}
|
||||
</button>
|
||||
<ul :class="open ? 'dropdown__list visible' : 'dropdown__list'">
|
||||
<li wire:click="$set('state','active')" @click="open = !open" :class="$wire.state == 'active' ? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.record_state_active') }}</li>
|
||||
<li wire:click="$set('state','archived')" @click="open = !open" :class="$wire.state == 'archived' ? 'dropdown__list-item active' : 'dropdown__list-item'">{{ __('recipe.record_state_not_active') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diet__form-column diet__form-column-xl">
|
||||
@if(!empty($ingredients))
|
||||
<div class="content__table diet__form-row">
|
||||
<div class="content__table-wrapper">
|
||||
<table class="cabinet__table-content">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('recipe.name_of_product')}}</th>
|
||||
<th>{{ __('recipe.portion')}}</th>
|
||||
<th>{{ __('recipe.units')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ingredients as $ingredient)
|
||||
<tr>
|
||||
<td>{{ $ingredient['name'] }}</td>
|
||||
<td>{{ $ingredient['portion'] }}</td>
|
||||
<td>{{ __('recipe.' . $ingredient['unit']) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="diet__form-columns">
|
||||
<div class="diet__form-column diet__form-column-lg">
|
||||
<input wire:model="ingredients_name" type="text" name="name" class="input" placeholder="Введите название продукта">
|
||||
</div>
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-adding">
|
||||
<div class="diet__form-column">
|
||||
<input wire:model="ingredients_portion" type="num" name="portion" class="input" placeholder="Порция">
|
||||
<select wire:model="ingredients_unit" name="unit" class="input">
|
||||
<option value="gr">гр</option>
|
||||
<option value="teespoon">ч. ложек</option>
|
||||
<option value="tablespoon">ст. ложек</option>
|
||||
<option value="ml">мл</option>
|
||||
<option value="pcs">шт</option>
|
||||
<option value="clove">зубчик</option>
|
||||
<option value="to_taste">по вкусу</option>
|
||||
</select>
|
||||
<button wire:click="addIngredient" type="button" class="btn btn-primary icon-plus"></button>
|
||||
</div>
|
||||
<button type="button" class="icon-gear"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div class="tabpanel" role="tabpanel" id="tabpanel-1" tabindex="0" aria-labelledby="tab-1">
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-row">
|
||||
<div class="label">
|
||||
Время приготавления
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="dropdown__button">
|
||||
1 час
|
||||
</button>
|
||||
<ul class="dropdown__list">
|
||||
<li data-value="1" class="dropdown__list-item active">1 час</li>
|
||||
<li data-value="30" class="dropdown__list-item">30 минут</li>
|
||||
</ul>
|
||||
<input type="text" name="time" class="dropdown__input hidden" hidden="" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-row">
|
||||
<div class="label">
|
||||
Статус
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="dropdown__button">
|
||||
Активна
|
||||
</button>
|
||||
<ul class="dropdown__list">
|
||||
<li data-value="active" class="dropdown__list-item active">Активна</li>
|
||||
<li data-value="unactive" class="dropdown__list-item">Неактивна</li>
|
||||
</ul>
|
||||
<input type="text" name="status" class="dropdown__input hidden" hidden="" value="unactive">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diet__form-column diet__form-column-xl">
|
||||
<div class="diet__form-columns">
|
||||
<div class="diet__form-column diet__form-column-lg">
|
||||
<input type="text" name="product" class="input" placeholder="Введите название продукта">
|
||||
</div>
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-adding">
|
||||
<div class="diet__form-column">
|
||||
<input type="num" name="ccal" class="input" placeholder="Порция">
|
||||
<button type="button" class="btn btn-primary icon-plus"></button>
|
||||
</div>
|
||||
<button type="button" class="icon-gear"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
<div class="tabpanel tabpanel--hidden" role="tabpanel" id="tabpanel-2" tabindex="0" aria-labelledby="tab-2">
|
||||
<div class="diet__form-column">
|
||||
<div class="diet__form-row">
|
||||
<div class="label">
|
||||
Статус
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="dropdown__button">
|
||||
Активна
|
||||
</button>
|
||||
<ul class="dropdown__list">
|
||||
<li data-value="active" class="dropdown__list-item active">Активна</li>
|
||||
<li data-value="unactive" class="dropdown__list-item">Неактивна</li>
|
||||
</ul>
|
||||
<input type="text" name="status" class="dropdown__input hidden" hidden="" value="unactive">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row fs-4_5">
|
||||
<div class="diet__form">
|
||||
<div class="row fs-4_5">
|
||||
<div class="col-12 col-sm-12 col-xl-4 my-4 dnd_file">
|
||||
<label for="form-image">{{ __('recipe.picture') }}</label>
|
||||
<div class="form__item mt-3 p-3 --radius --bordered text-center --f_grey">
|
||||
@@ -175,7 +374,7 @@
|
||||
</div>
|
||||
<div class="col-sm-7 col-lg-8 mb-3 mb-sm-0 px-sm-2 flex-grow-1">
|
||||
<div class="d-flex align-items-center form-control --textarea py-3 w-100 h-100" onclick="this.children[0].focus()">
|
||||
<textarea name="step[{{$i}}][description]" wire:mode.defer="steps.{{$i}}.description" autoresize="" placeholder="Введи описание шага" rows="5">{{ $steps[$i]['description'] ?? '' }}</textarea>
|
||||
<textarea name="step[{{$i}}][description]" wire:model.defer="steps.{{$i}}.description" autoresize="" placeholder="Введи описание шага" rows="5">{{ $steps[$i]['description'] ?? '' }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-flex flex-sm-column ps-sm-2 justify-content-between">
|
||||
@@ -194,6 +393,7 @@
|
||||
<input wire:model="video_url" type="text" class="form-control fs-4_5 py-3 w-100" placeholder="Прикрипите ссылку на YouTube видео" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mb-5 p-0 --mw-1000">
|
||||
<div class="row gx-3 gx-lg-4 gy-3 gy-lg-4">
|
||||
<div class="col">
|
||||
@@ -207,11 +407,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container mb-5 p-0 --mw-1000">
|
||||
@foreach ($errors->all() as $message)
|
||||
<div class="alert alert-warning">{{ $message }}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -84,15 +84,17 @@
|
||||
$i = 0;
|
||||
@endphp
|
||||
<div class="col-12 col-lg px-0 flex-grow-1 text-lg-end">
|
||||
@foreach($rawTypes as $keyType => $type)
|
||||
<div class="--tags mb-3">
|
||||
<div class="mb-2 --f_bold"> {{ __('recipe.' . $keyType) }} </div>
|
||||
@foreach($type as $tagName => $tagsCount)
|
||||
<a href="?tag={{ $tagName }}" data-idx="{{ $i . ":" . $colorsMaxIndex }}" style="font-weight: {{$tagsCount * 200}};" class="btn {{ $colorClasses[$i] }} btn-sm border-0 --radius">{{ Str::of($tagName)->split('/-/')[1] }} <sup>{{ $tagsCount }}</sup></a>
|
||||
@php $i = ($colorsMaxIndex > $i) ? $i+1 : 0; @endphp
|
||||
@if(!is_null($rawTypes))
|
||||
@foreach($rawTypes as $keyType => $type)
|
||||
<div class="--tags mb-3">
|
||||
<div class="mb-2 --f_bold"> {{ __('recipe.' . $keyType) }} </div>
|
||||
@foreach($type as $tagName => $tagsCount)
|
||||
<a href="?tag={{ $tagName }}" data-idx="{{ $i . ":" . $colorsMaxIndex }}" style="font-weight: {{$tagsCount * 200}};" class="btn {{ $colorClasses[$i] }} btn-sm border-0 --radius">{{ Str::of($tagName)->split('/-/')[1] }} <sup>{{ $tagsCount }}</sup></a>
|
||||
@php $i = ($colorsMaxIndex > $i) ? $i+1 : 0; @endphp
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<script src="/js/ckeditor.js"></script>
|
||||
<script src="https://unpkg.com/taggle/src/taggle.js" defer></script>
|
||||
<link type="text/css" rel="stylesheet" href="/css/toggle.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/css/bootstrap.min.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/css/datepicker.min.css" />
|
||||
@endpush
|
||||
@push('jq_scripts')
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
|
||||
@@ -5,6 +5,269 @@
|
||||
$recipeViewsCount = views($recipe)->unique()->count();
|
||||
@endphp
|
||||
@section('main_section')
|
||||
<section class="content">
|
||||
<div class="content__container container-sm">
|
||||
<div class="content__heading">
|
||||
<a href="{{ route('recipe.index') }}" class="content__heading-back icon-arrow-short-left">
|
||||
<span>Рецепты</span>
|
||||
</a>
|
||||
<div class="content__heading-stats">
|
||||
<div class="content__heading-stat icon-eye-fill">
|
||||
<strong>{{ $recipeViewsCount }}</strong>
|
||||
</div>
|
||||
<div class="content__heading-stat icon-heart-fill">
|
||||
<strong>@livewire('recipe.like-count', ['recipe' => $recipe])</strong>
|
||||
</div>
|
||||
<div class="content__heading-stat icon-message-square">
|
||||
<strong>{{ $recipe->comments_count }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content__person">
|
||||
<div class="content__person-name">
|
||||
{{ $author['name'] }}
|
||||
</div>
|
||||
<div class="content__person-thumb">
|
||||
@empty($author->profile_photo_path)
|
||||
<img src="{{ $author->profile_photo_url }}" alt="thumb">
|
||||
@else
|
||||
<img src="/storage/{{ $author->profile_photo_path }}" alt="thumb">
|
||||
@endempty
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="recipe">
|
||||
<div class="recipe__container container-sm">
|
||||
<div class="recipe__content">
|
||||
<div class="recipe__header">
|
||||
<div class="recipe__image">
|
||||
<img src="/storage/{{ $recipe->image }}" class="cover-image" alt="recipe">
|
||||
</div>
|
||||
<div class="recipe__body">
|
||||
<div class="recipe__caption">
|
||||
<h1 class="recipe__title">
|
||||
{{ $recipe->title }}
|
||||
</h1>
|
||||
<button type="button" class="recipe__action icon-dotts"></button>
|
||||
</div>
|
||||
<div class="recipe__stats">
|
||||
<div class="recipe__stat icon-clock">{{ __('recipe.t' . $recipe->cooking_time . "m") }}</div>
|
||||
<div class="recipe__stat icon-foots">{{ $recipe->steps->count() }} этапов</div>
|
||||
</div>
|
||||
<p class="recipe__desc">{!! $recipe->description !!}</p>
|
||||
@if (strlen(trim($recipe->video_url)) > 4)
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{ $recipe->video_url }}" class="recipe__link icon-youtube">Посмотреть рецепт на YouTube</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="recipe__info">
|
||||
<div class="recipe__info-column">
|
||||
<div class="recipe__info-caption">
|
||||
ПРОДУКТЫ:
|
||||
</div>
|
||||
<ul class="recipe__info-list marked">
|
||||
@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)
|
||||
<li>{{ $ingredient['name'] }} - {{ $ingredient['portion'] }} {{ __('recipe.' . $localizedUnit ) }}</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<div class="recipe__info-column">
|
||||
<div class="recipe__info-caption">
|
||||
ЦЕННОСТЬ:
|
||||
</div>
|
||||
<ul class="recipe__info-list">
|
||||
<li>WIP</li>
|
||||
{{--
|
||||
<li>Калории: 139.9 ккал</li>
|
||||
<li>Белки: 20.4 гр</li>
|
||||
<li>Жиры: 5.7 гр</li>
|
||||
<li>Углеводы: 1.8 гр</li>
|
||||
--}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="recipe__info-column">
|
||||
<div class="recipe__info-caption">
|
||||
ЦЕННОСТЬ:
|
||||
</div>
|
||||
<div class="recipe__info-tags">
|
||||
@foreach($recipe->tags->unique() as $curTag)
|
||||
<a href="{{ $curTag->recipe_index_url }}" class="recipe__info-tag">{{ $curTag->name }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recipe__footer">
|
||||
<a href="#commentsList" class="recipe__footer-action icon-message-square">
|
||||
<span>Комментировать</span>
|
||||
</a>
|
||||
@livewire('recipe.like', ['recipe' => $recipe])
|
||||
{{--<button class="recipe__footer-action icon-heart">
|
||||
<span>Нравится</span>
|
||||
</button>--}}
|
||||
<button class="recipe__footer-action icon-share">
|
||||
<span>Поделится</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="steps">
|
||||
<div class="steps__container container-sm">
|
||||
<h2 class="steps__title title">
|
||||
ПОШАГОВЫЙ ФОТО РЕЦЕПТ - КУРИНЫЕ РУЛЕТИКИ С СЫРОМ
|
||||
</h2>
|
||||
<ol class="steps__list">
|
||||
@foreach($recipe->steps as $step)
|
||||
|
||||
<li class="steps__item">
|
||||
<div class="steps__item-image">
|
||||
@if(isset($step['image']) && is_string($step['image']) && strlen($step["image"]) > 4)
|
||||
<img src="/storage/{{ $step['image'] }}" class="cover-image" alt="step">
|
||||
@endif
|
||||
</div>
|
||||
<div class="steps__item-text">
|
||||
<small>
|
||||
{!! $step['description'] !!}
|
||||
</small>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
{{--<li class="steps__item">
|
||||
<div class="steps__item-image">
|
||||
<img src="img/price_step_1.jpg" class="cover-image" alt="step">
|
||||
</div>
|
||||
<div class="steps__item-text">
|
||||
Режем куриную грудку тонкими ломтиками.
|
||||
</div>
|
||||
</li>
|
||||
<li class="steps__item">
|
||||
<div class="steps__item-image">
|
||||
<img src="img/price_step_2.jpg" class="cover-image" alt="step">
|
||||
</div>
|
||||
<div class="steps__item-text">
|
||||
<p>
|
||||
На край каждого кусочка филе кладем 1 ст. л. тертого сыра и порезанную зелень.
|
||||
</p>
|
||||
<p>
|
||||
Формируем рулетик из куриного филе с сыром и зеленью, подворачивая с боков, чтобы сыр при приготовлении не вытек. Скрепляем края половинками зубочисток.
|
||||
</p>
|
||||
</div>
|
||||
</li> --}}
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
<section class="reviews">
|
||||
<div class="reviews__container container-sm">
|
||||
<h2 class="reviews__title title">
|
||||
Отзывы
|
||||
</h2>
|
||||
<div class="reviews__tabs tabs">
|
||||
<div class="tablist" role="tablist" aria-labelledby="label">
|
||||
<button class="tab" role="tab" type="button" id="tab-1" aria-selected="true" aria-controls="tabpanel-1">Положительные 2</button>
|
||||
<button class="tab" role="tab" type="button" id="tab-2" aria-selected="false" aria-controls="tabpanel-2" tabindex="-1">Негативные 1</button>
|
||||
</div>
|
||||
<div class="tabpanel" role="tabpanel" id="tabpanel-1" tabindex="0" aria-labelledby="tab-1">
|
||||
<div class="reviews__items">
|
||||
<div class="review">
|
||||
<div class="review__thumb">
|
||||
<img src="img/user.png" class="cover-image" alt="user">
|
||||
</div>
|
||||
<div class="review__content">
|
||||
<div class="review__name">
|
||||
Артём
|
||||
</div>
|
||||
<blockquote class="review__quote">
|
||||
После данного плана питания стал чувствовать себя куда лучше! Обязательно продолжу работать с Дмитрием!
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="review__info">
|
||||
<div class="review__programm">
|
||||
Лёгкий
|
||||
</div>
|
||||
<div class="review__rate icon-star">
|
||||
5.0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="review">
|
||||
<div class="review__thumb">
|
||||
<img src="img/user.png" class="cover-image" alt="user">
|
||||
</div>
|
||||
<div class="review__content">
|
||||
<div class="review__name">
|
||||
Артём
|
||||
</div>
|
||||
<blockquote class="review__quote">
|
||||
После данного плана питания стал чувствовать себя куда лучше! Обязательно продолжу работать с Дмитрием!
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="review__info">
|
||||
<div class="review__programm">
|
||||
Лёгкий
|
||||
</div>
|
||||
<div class="review__rate icon-star">
|
||||
5.0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabpanel" role="tabpanel" id="tabpanel-2" tabindex="0" aria-labelledby="tab-2">
|
||||
<div class="reviews__items">
|
||||
<div class="review">
|
||||
<div class="review__thumb">
|
||||
<img src="img/user.png" class="cover-image" alt="user">
|
||||
</div>
|
||||
<div class="review__content">
|
||||
<div class="review__name">
|
||||
Артём
|
||||
</div>
|
||||
<blockquote class="review__quote">
|
||||
Курить план – это плохо! Гласит лозунг и кричит Минздрав. Ну, конечно …Ничем не хуже водки, а водку везде продают и ничего.. ... Говорят, некоторые годами курят план и живут нормальной жизнью…Ну, если они считают это нормальной жизнью, то пусть и дальше существуют…Я не хочу…Я теперь спрашиваю себя – а зачем мне жить, что б просто курить траву?..Теперь мне плохо и траву курить, Проклятый мир! Даже год не покурил… Мне нужно что-то получше.. почище….ярче!!!
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="review__info">
|
||||
<div class="review__programm">
|
||||
Лёгкий
|
||||
</div>
|
||||
<div class="review__rate icon-star">
|
||||
5.0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="" class="reviews__form">
|
||||
<textarea class="textarea textarea-white" placeholder="Введите отзыв"></textarea>
|
||||
<div class="reviews__form-column">
|
||||
<div class="reviews__form-rate star-rating">
|
||||
<input type="radio" name="rate" id="rate-5" value="5" class="star-rating__input hidden" hidden>
|
||||
<label class="star-rating__label" for="rate-5"></label>
|
||||
<input type="radio" name="rate" id="rate-4" value="4" class="star-rating__input hidden" hidden>
|
||||
<label class="star-rating__label" for="rate-4"></label>
|
||||
<input type="radio" name="rate" id="rate-3" value="3" class="star-rating__input hidden" hidden>
|
||||
<label class="star-rating__label" for="rate-3"></label>
|
||||
<input type="radio" name="rate" id="rate-2" value="2" class="star-rating__input hidden" hidden>
|
||||
<label class="star-rating__label" for="rate-2"></label>
|
||||
<input type="radio" name="rate" id="rate-1" value="1" class="star-rating__input hidden" hidden>
|
||||
<label class="star-rating__label" for="rate-1"></label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary">Оставить отзыв</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center flex-nowrap mb-4 px-4 py-3 --bg_white --shadow --radius --mw-1000 --f_bold --f_main overflow-x-xs-scroll">
|
||||
<a href="{{ route('recipe.index') }}" class="d-flex w-2/5 align-items-center --f_bold">
|
||||
|
||||
Reference in New Issue
Block a user