diff --git a/app/Http/Controllers/Bo/NewsController.php b/app/Http/Controllers/Bo/NewsController.php index fa60c8ac..def4e5eb 100644 --- a/app/Http/Controllers/Bo/NewsController.php +++ b/app/Http/Controllers/Bo/NewsController.php @@ -86,16 +86,7 @@ class NewsController extends Controller return DB::transaction(function () use ($request) { $news = new News(); $news->fill($request->validated()); - $oldestNewsWithHighlight = News::query()->where('highlight', true)->orderBy('created_at')->get(); if ($news->saveOrFail()) { - if ($news->highlight === true) { - if ($oldestNewsWithHighlight->count() >= 2) { - /** @var \App\Models\News $firstNews */ - $firstNews = $oldestNewsWithHighlight->first(); - $firstNews->highlight = false; - $firstNews->save(); - } - } return redirect()->route('bo.news.edit', $news) ->with('success', trans('crud.messages.has_been_created', [ 'model' => Str::ucfirst(trans('models.classes.news')) @@ -144,16 +135,7 @@ class NewsController extends Controller ): \Illuminate\Http\RedirectResponse { return DB::transaction(function () use ($request, $news) { $news->fill($request->validated()); - $oldestNewsWithHighlight = News::query()->where('highlight', true)->orderBy('created_at')->get(); if ($news->saveOrFail()) { - if ($news->highlight === true) { - if ($oldestNewsWithHighlight->count() >= 2) { - /** @var \App\Models\News $firstNews */ - $firstNews = $oldestNewsWithHighlight->first(); - $firstNews->highlight = false; - $firstNews->save(); - } - } return redirect()->route('bo.news.edit', $news) ->with('success', trans('crud.messages.has_been_updated', [ 'model' => Str::ucfirst(trans('models.classes.news')) diff --git a/app/Http/Controllers/Club/HomeController.php b/app/Http/Controllers/Club/HomeController.php index 325435e2..633255b8 100644 --- a/app/Http/Controllers/Club/HomeController.php +++ b/app/Http/Controllers/Club/HomeController.php @@ -17,9 +17,7 @@ class HomeController extends Controller { $newsClubModels = NewsClub::query()->where('published', true)->orderBy('publish_at', 'asc')->take(3)->get(); $discountModels = Discount::query()->get(); - $discountsTotal = array_sum($discountModels->map(function (Discount $discountModel) { - return $discountModel->value; - })->toArray()); + $discountsTotal = $discountModels->sum('value'); return (auth('club')->check()) ? view('club.pages.home.homepage', compact('newsClubModels', 'discountModels', 'discountsTotal')) : view('club.pages.home.guest', compact('newsClubModels')); diff --git a/app/Http/Controllers/Fo/HomeController.php b/app/Http/Controllers/Fo/HomeController.php index c5c81647..a8be4e85 100644 --- a/app/Http/Controllers/Fo/HomeController.php +++ b/app/Http/Controllers/Fo/HomeController.php @@ -7,6 +7,7 @@ use App\Enums\StaticPageType; use App\Http\Controllers\Controller; use App\Http\Requests\Fo\SingleOptinRequest; use App\Models\DemarcheSlide; +use App\Models\Discount; use App\Models\MainSlide; use App\Models\Product; use App\Models\GeneralSetting; @@ -46,6 +47,7 @@ class HomeController extends Controller ])->limit(9)->get(); $videoModels = Video::query()->where('published', true)->where('is_on_homepage', true) ->orderBy('order')->with('product')->limit(9)->get(); + $discountsTotal = Discount::query()->get()->sum('value'); return view('fo.pages.home', compact( 'staticPageModel', 'mainSlideModels', @@ -55,7 +57,8 @@ class HomeController extends Controller 'newsModels', 'recipeModels', 'hotNewsSettings', - 'videoModels' + 'videoModels', + 'discountsTotal', )); } diff --git a/app/Http/Requests/Bo/GeneralSettings/UpdateGeneralSettingRequest.php b/app/Http/Requests/Bo/GeneralSettings/UpdateGeneralSettingRequest.php index 01fdf7a2..f3c69dc5 100644 --- a/app/Http/Requests/Bo/GeneralSettings/UpdateGeneralSettingRequest.php +++ b/app/Http/Requests/Bo/GeneralSettings/UpdateGeneralSettingRequest.php @@ -221,7 +221,7 @@ class UpdateGeneralSettingRequest extends FormRequest ]; return \array_merge( $rules, - $this->pictureRules('picture', 200, 100, 200, 100), + $this->pictureRules('picture', 500, 281, 500, 281), ); } diff --git a/app/Http/Requests/Bo/Products/StoreProductRequest.php b/app/Http/Requests/Bo/Products/StoreProductRequest.php index 34b120ec..2968fe78 100644 --- a/app/Http/Requests/Bo/Products/StoreProductRequest.php +++ b/app/Http/Requests/Bo/Products/StoreProductRequest.php @@ -56,12 +56,12 @@ class StoreProductRequest extends FormRequest 'seo_title' => 'required|min:45|max:70', 'seo_description' => 'required|min:50|max:160', 'label' => 'required|string|between:3,255', - 'picture_alt' => 'required_with:picture|nullable|between:3,255', - 'picture_title' => 'required_with:picture|nullable|between:3,255', - 'banner_alt' => 'required_with:banner|nullable|between:3,255', - 'banner_title' => 'required_with:banner|nullable|between:3,255', - 'packaging_alt' => 'required_with:packaging|nullable|between:3,255', - 'packaging_title' => 'required_with:packaging|nullable|between:3,255', + 'picture_alt' => 'required_with:picture|nullable|string|between:3,255', + 'picture_title' => 'required_with:picture|nullable|string|between:3,255', + 'banner_alt' => 'required_with:banner|nullable|string|between:3,255', + 'banner_title' => 'required_with:banner|nullable|string|between:3,255', + 'packaging_alt' => 'required_with:packaging|nullable|string|between:3,255', + 'packaging_title' => 'required_with:packaging|nullable|string|between:3,255', 'description' => ['required', 'string', new WysiwygLength()], 'details' => ['required', 'string', new WysiwygLength()], 'preparation' => ['required', 'string', new WysiwygLength()], @@ -178,7 +178,7 @@ class StoreProductRequest extends FormRequest return \array_merge( $rules, $this->pictureRules('picture', 300, 200, 300, 200), - $this->pictureRules('banner', 1440, 420, 1440, 420), + $this->pictureRules('banner', 1440, 420, 1440, 420, true), $this->pictureRules('packaging', 315, 450, 315, 450), ); } diff --git a/app/Http/Requests/Bo/Recipes/StoreRecipeRequest.php b/app/Http/Requests/Bo/Recipes/StoreRecipeRequest.php index 6b1deb99..c02a3f49 100644 --- a/app/Http/Requests/Bo/Recipes/StoreRecipeRequest.php +++ b/app/Http/Requests/Bo/Recipes/StoreRecipeRequest.php @@ -62,7 +62,7 @@ class StoreRecipeRequest extends FormRequest 'picture_alt' => 'required_with:picture|nullable|between:3,255', 'picture_title' => 'required_with:picture|nullable|between:3,255', 'ingredients_list.*' => 'required|array', - 'ingredients_list.*.value' => 'sometimes|nullable|numeric|between:1,1000', + 'ingredients_list.*.value' => 'sometimes|nullable|decimal:0,2|between:1,1000', 'ingredients_list.*.label_unit' => [ 'required_with:ingredients_list.*.label_unit', 'sometimes', @@ -79,7 +79,7 @@ class StoreRecipeRequest extends FormRequest 'products' => 'required|array', 'products.*' => 'required|integer|exists:products,id', 'preparation_time' => 'required|numeric|between:1,1000', - 'cooking_time' => 'required|numeric|between:1,1000', + 'cooking_time' => 'nullable|numeric|between:0,1000', 'nb_guests' => 'required|numeric|between:1,50', 'difficulty' => ['required', new Enum(DifficultyEnum::class)], 'highlight' => 'required|boolean', diff --git a/app/Models/News.php b/app/Models/News.php index d02423bc..7079fe43 100644 --- a/app/Models/News.php +++ b/app/Models/News.php @@ -3,25 +3,35 @@ namespace App\Models; use App\Lib\Helpers\FileStorageHelper; -use App\Traits\Models\ActivityLog; -use Illuminate\Database\Eloquent\Factories\HasFactory; -use Illuminate\Database\Eloquent\Model; use App\Lib\Helpers\ToolboxHelper; +use App\Traits\Models\ActivityLog; use Detection\MobileDetect; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\Session; +use Illuminate\Support\Str; /** - * @property string $title The title of the news. - * @property string $content The content of the news. - * @property string $url The linkedin url of the news. - * @property string $picture Picture path. - * @property string $picture_title Picture title attribute. - * @property string $picture_alt Picture alt attribute. - * @property boolean $published News publish status. - * @property-read \Illuminate\Support\Carbon $published_at News published_at. - * @property-read \Illuminate\Support\Carbon $unpublished_at News unpublished_at. - * @property-read \Illuminate\Support\Carbon $created_at Created date. - * @property-read \Illuminate\Support\Carbon $updated_at Updated date. + * @property string $seo_title The seo title of the news. + * @property string $seo_description The seo description of the news. + * @property string $title The title of the news. + * @property string|null $subtitle The subtitle of the news. + * @property string $subtitle The subtitle of the news. + * @property string $picture News picture. + * @property string $picture_alt Picture alt attribute. + * @property string $picture_title Picture title attribute. + * @property string $thumbnail News thumbnail. + * @property string $thumbnail_alt Thumbnail alt attribute. + * @property string $thumbnail_title Thumbnail title attribute. + * @property string $content The content of the news. + * @property \App\Models\NewsCategory $news_category_id The category associated to the news. + * @property boolean $highlight News highlight status. + * @property boolean $published News publish status. + * @property-read \Illuminate\Support\Carbon $published_at News published_at. + * @property-read \Illuminate\Support\Carbon $unpublished_at News unpublished_at. + * @property-read \Illuminate\Support\Carbon $created_at Created date. + * @property-read \Illuminate\Support\Carbon $updated_at Updated date. */ class News extends Model { @@ -74,12 +84,13 @@ class News extends Model { static::creating(function (self $news) { self::makeStatusSense($news); + self::checkHighlightField($news); self::assertTitleIsUnique($news->title); self::manageFields($news); }); static::updating(function (self $news) { self::makeStatusSense($news); - self::assertTitleIsUnique($news->title, $news->getKey()); + self::checkHighlightField($news); self::manageFields($news); }); static::updated(function (self $news) { @@ -120,6 +131,34 @@ class News extends Model } } + /** + * Adjusts news status using current status and publish dates. + * + * @param self $news + * @return void + */ + private static function checkHighlightField(self $news): void + { + $hotNewsModels = News::query() + ->where('published', true) + ->where('highlight', true) + ->where('id', '!=', $news->getKey()) + ->orderBy('publish_at', 'ASC') + ->get(); + if ($hotNewsModels->count() >= 2 && $news->highlight) { + $hotNewsModel = $hotNewsModels->first(); + $hotNewsModel->highlight = false; + $hotNewsModel->saveOrFail(); + Session::flash('warning', trans( + 'Maximum 2 :model1 peuvent être mise en avant, la plus ancienne a donc été enlevée des :model2', + [ + 'model1' => Str::of(trans('models.classes.news'))->plural(), + 'model2' => trans('models.classes.hot_news'), + ] + )); + } + } + /** * Getter the current status following planification dates planificated_status. * @@ -151,6 +190,7 @@ class News extends Model */ private static function manageFields(self $model): void { + self::assertTitleIsUnique($model->title, $model->getKey()); $model->slug = str($model->title)->slug(); $model->thumbnail = FileStorageHelper::storeFile($model, $model->thumbnail, true); $model->picture = FileStorageHelper::storeFile($model, $model->picture, true); diff --git a/app/Models/Product.php b/app/Models/Product.php index f1e8d201..b3f1e301 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -114,8 +114,8 @@ class Product extends Model implements SeoInterface }); static::deleted(function (self $product) { FileStorageHelper::removeFile($product, 'picture'); - FileStorageHelper::removeOldFile($product, 'banner'); - FileStorageHelper::removeOldFile($product, 'packaging'); + FileStorageHelper::removeFile($product, 'banner'); + FileStorageHelper::removeFile($product, 'packaging'); }); } diff --git a/app/Traits/Requests/HasPicture.php b/app/Traits/Requests/HasPicture.php index 17cbcbe3..d8c57086 100644 --- a/app/Traits/Requests/HasPicture.php +++ b/app/Traits/Requests/HasPicture.php @@ -152,8 +152,11 @@ trait HasPicture $changedPicture = ltrim($decodedPath, '/'); $this->merge([ $name => $changedPicture - ]); - } //end if + ]);// le else if sert a gerer le cas ou l'image de la bannière produit est nulle + } else if (is_null($picturePath)) { + $this->merge([$name => null]); + return; + } } /** diff --git a/database/migrations/2024_08_10_153246_create_news_table.php b/database/migrations/2024_08_10_153246_create_news_table.php index 5df454e7..16c5ff1c 100644 --- a/database/migrations/2024_08_10_153246_create_news_table.php +++ b/database/migrations/2024_08_10_153246_create_news_table.php @@ -16,7 +16,7 @@ return new class extends Migration $table->string('seo_title')->comment('The seo title of the news.'); $table->string('seo_description')->comment('The seo description of the news.'); $table->string('title')->comment('The title of the news.'); - $table->string('subtitle')->nullable()->comment('The title of the news.'); + $table->string('subtitle')->nullable()->comment('The subtitle of the news.'); $table->string('picture')->comment('Picture path.'); $table->string('picture_alt')->comment('Picture alt attribute.'); $table->string('picture_title')->comment('Picture title attribute.'); @@ -25,8 +25,9 @@ return new class extends Migration $table->string('thumbnail_title')->comment('Thumbnail title attribute.'); $table->string('slug')->unique()->comment('Unique title slug'); $table->text('content')->comment('The content of the news.'); - $table->foreignId('news_category_id')->constrained('news_categories')->restrictOnDelete()->comment('News category id'); - $table->boolean('highlight')->comment('Highlight status.'); + $table->foreignId('news_category_id')->constrained('news_categories') + ->restrictOnDelete()->comment('News category id'); + $table->boolean('highlight')->comment('News highlight status.'); $table->boolean('published')->comment('News publish status.'); $table->timestamp('publish_at')->nullable()->comment('News publishment date.'); $table->timestamp('unpublish_at')->nullable()->comment('News unpublishment date.'); diff --git a/database/migrations/2024_09_18_150649_remove_required_on_banner_in_products_table.php b/database/migrations/2024_09_18_150649_remove_required_on_banner_in_products_table.php new file mode 100644 index 00000000..60aa8924 --- /dev/null +++ b/database/migrations/2024_09_18_150649_remove_required_on_banner_in_products_table.php @@ -0,0 +1,36 @@ +string('banner')->nullable()->change(); + $table->string('banner_alt')->nullable()->change(); + $table->string('banner_title')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down(): void + { + Schema::table('products', function (Blueprint $table) { + $table->string('banner')->nullable(false)->change(); + $table->string('banner_alt')->nullable(false)->change(); + $table->string('banner_title')->nullable(false)->change(); + }); + } +}; diff --git a/database/migrations/2024_09_19_093926_alter_cookingtime_recipes_table.php b/database/migrations/2024_09_19_093926_alter_cookingtime_recipes_table.php new file mode 100644 index 00000000..c1108c28 --- /dev/null +++ b/database/migrations/2024_09_19_093926_alter_cookingtime_recipes_table.php @@ -0,0 +1,28 @@ +unsignedSmallInteger('cooking_time')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('recipes', function (Blueprint $table) { + $table->unsignedSmallInteger('cooking_time')->nullable(false); + }); + } +}; diff --git a/database/migrations/2024_09_19_100415_alter_tips_length_recipes_table.php b/database/migrations/2024_09_19_100415_alter_tips_length_recipes_table.php new file mode 100644 index 00000000..763aaf86 --- /dev/null +++ b/database/migrations/2024_09_19_100415_alter_tips_length_recipes_table.php @@ -0,0 +1,23 @@ +string('tips', 500)->comment('Recipe tips.')->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void {} +}; diff --git a/resources/lang/fr/crud.php b/resources/lang/fr/crud.php index 4ef24d27..8f39fa5f 100644 --- a/resources/lang/fr/crud.php +++ b/resources/lang/fr/crud.php @@ -74,7 +74,7 @@ return [ 'picture_title_helper' => 'Utile pour les utilisateurs, s\'affiche en passant la souris sur l\'image.', 'picture_title_label' => 'Attribut du titre de l\'image', 'picture_alt_helper' => 'Doit décrire votre image pour les moteurs de recherche et - les aveugles (5 à 6 mots).', + les personnes malvoyantes (5 à 6 mots).', 'picture_alt_label' => 'Attribut Alt de l\'image', 'text_warning' => 'Relisez votre contenu avant de le publier.', ], diff --git a/resources/sass/fo/pages/home.scss b/resources/sass/fo/pages/home.scss index 98c13a77..c7291147 100644 --- a/resources/sass/fo/pages/home.scss +++ b/resources/sass/fo/pages/home.scss @@ -1,31 +1,74 @@ #home { - .hot-news-content{ - width: 250px; - height: 22rem; + .hot-news-content { + height: fit-content; + + @include media-breakpoint-up(xl) { + width: 250px; + } + + .border-custom { + border-bottom: 2px #0006 dashed; + + @include media-breakpoint-up(sm) { + &:nth-child(1), &:nth-child(2) { + border-right: 2px #0006 dashed; + border-bottom: 0; + } + + &:nth-child(2) { + border-right: 0; + border-bottom: 0; + } + } + + @include media-breakpoint-up(md) { + &:nth-child(1), &:nth-child(2) { + border-right: 2px #0006 dashed; + border-bottom: 0; + } + } + + @include media-breakpoint-up(xl) { + &:nth-child(1), &:nth-child(2) { + border-right: 0 !important; + border-bottom: 2px #0006 dashed !important; + } + } + } } - #hot-news-desktop{ - .wood-background{ - height: 20rem; + #hot-news-desktop { + margin-top: -1rem; + + @include media-breakpoint-up(md) { + padding-top: 8rem; + } + + @include media-breakpoint-up(xl) { + padding-top: 0; + } + + .wood-background { + bottom: 1rem; + min-height: 100%; background-image: url('@/images/home/hot-news-wood.png'); + background-position: bottom; background-size: cover; + + @include media-breakpoint-up(md) { + height: calc(14vw + 5rem); + } } - .hot-news-position{ - position: absolute; + .hot-news-position { z-index: 10; - top: -5%; - right: 13%; + width: calc(100% - 6rem); } } - #hot-news{ + #hot-news { transition: .3s; - hr { - border-top: 2px dashed; - } - &.hot-news-hide { transform: translate(100%, -50%) !important; } @@ -115,7 +158,7 @@ } &-next-custom { - left: calc(20vw + 29.5rem); + right: 1rem; } } } @@ -275,8 +318,8 @@ } } - .swiper-videos{ - .swiper-slide{ + .swiper-videos { + .swiper-slide { transition: all .2s ease; &-prev { @@ -291,7 +334,7 @@ } } - .swiper-videos-button-prev{ + .swiper-videos-button-prev { top: 55%; left: 4%; @@ -300,7 +343,7 @@ } } - .swiper-videos-button-next{ + .swiper-videos-button-next { top: 55%; right: 4%; diff --git a/resources/sass/fo/pages/recipe.scss b/resources/sass/fo/pages/recipe.scss index 6489b4e3..b743b6eb 100644 --- a/resources/sass/fo/pages/recipe.scss +++ b/resources/sass/fo/pages/recipe.scss @@ -37,7 +37,9 @@ } .recipe-image-wrapper { - transform: translateX(8vw); + @include media-breakpoint-up(lg) { + transform: translateX(8vw); + } @include media-breakpoint-up(xl) { position: absolute; @@ -84,4 +86,4 @@ } } } -} +} \ No newline at end of file diff --git a/resources/sass/fo/partials/_testimonial-card.scss b/resources/sass/fo/partials/_testimonial-card.scss index 7b96d50f..02c51329 100644 --- a/resources/sass/fo/partials/_testimonial-card.scss +++ b/resources/sass/fo/partials/_testimonial-card.scss @@ -1,7 +1,6 @@ - .testimonial-card { .testimonial-img { - clip-path: polygon(60% .2vw,100% 0,100% calc(100% - .2vw),70% calc(100% - .35vw),40% 100%,0 calc(100% - .2vw),0 .2vw,30% 0); + clip-path: polygon(60% .2vw, 100% 0, 100% calc(100% - .2vw), 70% calc(100% - .35vw), 40% 100%, 0 calc(100% - .2vw), 0 .2vw, 30% 0); &-wrapper { @include media-breakpoint-up(lg) { @@ -36,4 +35,13 @@ min-height: 5rem; } } + + .fa-play { + width: 2rem; + height: 2rem; + } + + .video-link { + cursor: pointer; + } } diff --git a/resources/sass/fo/utilities/_bootstrap-custom.scss b/resources/sass/fo/utilities/_bootstrap-custom.scss index 07fcfbbd..9c4f26ae 100644 --- a/resources/sass/fo/utilities/_bootstrap-custom.scss +++ b/resources/sass/fo/utilities/_bootstrap-custom.scss @@ -24,19 +24,43 @@ .w#{$infix}-25 { width: 25% !important; } + .w#{$infix}-50 { width: 50% !important; } + .w#{$infix}-75 { width: 75% !important; } + .w#{$infix}-100 { width: 100% !important; } + .w#{$infix}-fit { width: fit-content !important; } + .h#{$infix}-25 { + height: 25% !important; + } + + .h#{$infix}-50 { + height: 50% !important; + } + + .h#{$infix}-75 { + height: 75% !important; + } + + .h#{$infix}-100 { + height: 100% !important; + } + + .h#{$infix}-fit { + height: fit-content !important; + } + @each $prop, $unit in (width: vw, height: vh) { @each $size in [25, 50, 75, 100] { .#{$unit}#{$infix}-#{$size} { diff --git a/resources/ts/bo/components/ImageInputComponent.vue b/resources/ts/bo/components/ImageInputComponent.vue index 6df7fb53..492aeb05 100644 --- a/resources/ts/bo/components/ImageInputComponent.vue +++ b/resources/ts/bo/components/ImageInputComponent.vue @@ -31,7 +31,7 @@ @change="pictureInputHasChanged" type="file" class="d-none" - :name="`${fileParamIsFile ? parameters.name : ''}`" + :name="parameters.name" accept=".jpg,.jpeg,.gif,.png" :aria-describedby="`Help${parameters.id}`" > diff --git a/resources/ts/bo/components/ListItemComponent.vue b/resources/ts/bo/components/ListItemComponent.vue index 2f0e6fa2..086a7228 100644 --- a/resources/ts/bo/components/ListItemComponent.vue +++ b/resources/ts/bo/components/ListItemComponent.vue @@ -53,6 +53,7 @@ :name="`${inputParameters.name}[${String(itemIndex)}][${column[0]}]`" :type="itemParameters.type[columnIndex]" v-model="item[column[0] as keyof typeof item]" + :step="itemParameters.type[columnIndex] === 'number' ? (inputParameters.step ?? 1) : undefined" :placeholder="inputParameters.placeholder[columnIndex]" :min="itemParameters.type[columnIndex] == 'number' ? '0' : undefined" > @@ -120,11 +121,15 @@ const allErrors = ref({}); const inputParameters = reactive<{ name: string, placeholder: Array, + step: number, }>({ name: "", placeholder: [""], + step: 1 }); + + /** Item parameters. */ const itemParameters = reactive<{ list: Array, @@ -158,6 +163,7 @@ onMounted(() => { /** Input parameters. */ inputParameters.name = data.inputName; inputParameters.placeholder = data.inputPlaceholder; + inputParameters.step = data.step ?? null; /** Item parameters. */ itemParameters.list = data.itemList; itemParameters.columns = data.itemColumns; diff --git a/resources/ts/fo/base/common.ts b/resources/ts/fo/base/common.ts index b3b5acc4..6f07a2e4 100644 --- a/resources/ts/fo/base/common.ts +++ b/resources/ts/fo/base/common.ts @@ -546,6 +546,32 @@ document.addEventListener("DOMContentLoaded", function () { document.querySelector("#swiper-videos .swiper-slide-next")?.setAttribute("inert", "true"); }); } + if (swiper.el.id === "swiper-testimonials") { + swiper.on("slideChange", function() { + updateTestimonialVideoModal(swiper.slides[swiper.activeIndex]); + }); + } + } + + function updateTestimonialVideoModal(currentSlide: any) { + const videoLinkElement = currentSlide.querySelector(".video-link") as HTMLAnchorElement; + if (!videoLinkElement) { + return; + } + const videoModal = document.querySelector("#testimonial-video-modal") as HTMLDivElement; + if (!videoModal) { + return; + } + const modalLink = document.querySelector(".video-inlaid") as HTMLAnchorElement; + if (!modalLink) { + return; + } + modalLink.setAttribute("href", String(videoLinkElement.dataset.videoLink)); + const iframe = modalLink.querySelector("iframe"); + if (!iframe) { + return; + } + iframe.setAttribute("src", String(videoLinkElement.dataset.videoLink)); } function eventBtnPlayPause(swiper: Swiper, btnPlayPause: HTMLElement | null) { diff --git a/resources/ts/fo/components/IngredientsListCalculatorComponent.vue b/resources/ts/fo/components/IngredientsListCalculatorComponent.vue index 8ca4b562..125396b7 100644 --- a/resources/ts/fo/components/IngredientsListCalculatorComponent.vue +++ b/resources/ts/fo/components/IngredientsListCalculatorComponent.vue @@ -35,7 +35,7 @@ class="text-quad me-2" >{{ (ingredient.is_proportionnal ? (Math.round((nbGuestsCustom * ingredient.value / nbGuests)* 2 ) * 0.5 > 1 ? Math.round((nbGuestsCustom * ingredient.value / nbGuests)* 2 ) * 0.5 : - 1) : ingredient.value) }}{{ ingredient.label_unit }} + 1) : ingredient.value) }} {{ " " }} {{ ingredient.label_unit }} {{ ingredient.label_value }} diff --git a/resources/views/bo/pages/general_settings/values/hotNews.blade.php b/resources/views/bo/pages/general_settings/values/hotNews.blade.php index 706de6ce..041b03ca 100644 --- a/resources/views/bo/pages/general_settings/values/hotNews.blade.php +++ b/resources/views/bo/pages/general_settings/values/hotNews.blade.php @@ -54,8 +54,8 @@ @include('bo.partials.inputs.varchar-picture', [ 'id' => 'hotNewsPicture', 'name' => 'picture', - 'width' => 200, - 'height' => 100, + 'width' => 500, + 'height' => 281, 'value' => json_decode(collect($generalSettingModel->value))->picture, 'required' => true, 'preview' => true, diff --git a/resources/views/bo/pages/main_slides/form.blade.php b/resources/views/bo/pages/main_slides/form.blade.php index c837acd8..265cee62 100644 --- a/resources/views/bo/pages/main_slides/form.blade.php +++ b/resources/views/bo/pages/main_slides/form.blade.php @@ -495,7 +495,7 @@ {{-- IS_NEW --}}
@include('bo.partials.inputs.tinyint-boolean', [ - 'id' => 'mainSlidePublished', + 'id' => 'mainSlideIsNew', 'name' => 'new', 'model' => $mainSlideModel ?? null, 'label' => str(__('validation.custom.new'))->ucFirst(), diff --git a/resources/views/bo/pages/meats/form.blade.php b/resources/views/bo/pages/meats/form.blade.php index d7b0aae8..3aabf942 100644 --- a/resources/views/bo/pages/meats/form.blade.php +++ b/resources/views/bo/pages/meats/form.blade.php @@ -80,6 +80,8 @@ 'model' => __('models.classes.meat'), ]))->ucfirst(), 'name' => 'color', + 'value' => "#268DC6", + 'presetColors' => ["#268DC6", "#EE7C28", "#C6725C", "#0F437E", "#AC283D", "#FDC331", "#FFDB9A", "#063", "#111", "#fbf8f5"], 'model' => $meatModel ?? null, 'nullable' => false, 'required' => true, diff --git a/resources/views/bo/pages/news/index-list.blade.php b/resources/views/bo/pages/news/index-list.blade.php index bf785c26..705dd0d0 100644 --- a/resources/views/bo/pages/news/index-list.blade.php +++ b/resources/views/bo/pages/news/index-list.blade.php @@ -6,6 +6,7 @@ 'title' => str(__('validation.attributes.title'))->ucfirst(), 'news_category_id' => str(__('validation.custom.category'))->ucfirst(), 'picture' => str(__('validation.attributes.image'))->ucfirst(), + 'highlight' => str(__('validation.custom.highlight'))->ucfirst(), 'published' => str(__('validation.custom.publication'))->ucfirst(), 'updated_at' => str(__('validation.attributes.updated_at'))->ucfirst(), ], @@ -20,6 +21,9 @@ {{ $newsModel->picture_alt }} + + {{ str($newsModel->highlight ? 'oui' : 'non')->ucFirst() }} + @include('bo.modules.change-published-status', [ 'routeName' => 'news', 'model' => $newsModel, diff --git a/resources/views/bo/pages/products/form.blade.php b/resources/views/bo/pages/products/form.blade.php index 2c5734d5..15110710 100644 --- a/resources/views/bo/pages/products/form.blade.php +++ b/resources/views/bo/pages/products/form.blade.php @@ -241,7 +241,7 @@ 'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), 'hasWordCounter' => true, @@ -253,7 +253,7 @@ 'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), ]) @@ -266,7 +266,7 @@ 'field1' => str(__('validation.custom.attribute_title'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), 'hasWordCounter' => true, @@ -278,7 +278,7 @@ 'field1' => str(__('validation.custom.attribute_title'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), ]) @@ -311,19 +311,18 @@ 'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), 'hasWordCounter' => true, 'name' => 'banner_alt', - 'required' => true, 'model' => $productModel ?? null, 'helper' => __('crud.minicrud.picture_alt_helper'), 'placeholder' => __(':field1 :inter1:field2 :inter2:model', [ 'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), ]) @@ -336,19 +335,18 @@ 'field1' => str(__('validation.custom.attribute_title'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), 'hasWordCounter' => true, 'name' => 'banner_title', - 'required' => true, 'model' => $productModel ?? null, 'helper' => __('crud.minicrud.picture_title_helper'), 'placeholder' => __(':field1 :inter1:field2 :inter2:model', [ 'field1' => str(__('validation.custom.attribute_title'))->ucFirst(), 'inter1' => __('validation.custom.of_the.vowel'), 'field2' => __('validation.attributes.image'), - 'inter2' => __('validation.custom.of_the.female'), + 'inter2' => __('validation.custom.of_the.male'), 'model' => __('models.classes.product'), ]), ]) @@ -361,7 +359,6 @@ 'width' => 1440, 'height' => 420, 'model' => $productModel ?? null, - 'required' => true, 'preview' => true, ])
diff --git a/resources/views/bo/pages/ranges/form.blade.php b/resources/views/bo/pages/ranges/form.blade.php index 78ee313d..65430ae3 100644 --- a/resources/views/bo/pages/ranges/form.blade.php +++ b/resources/views/bo/pages/ranges/form.blade.php @@ -80,6 +80,8 @@ 'model' => __('models.classes.range'), ]))->ucfirst(), 'name' => 'color', + 'value' => "#268DC6", + 'presetColors' => ["#268DC6", "#EE7C28", "#C6725C", "#0F437E", "#AC283D", "#FDC331", "#FFDB9A", "#063"], 'model' => $rangeModel ?? null, 'required' => true, 'disabled' => false, diff --git a/resources/views/bo/pages/recipes/form.blade.php b/resources/views/bo/pages/recipes/form.blade.php index a1511b3b..0b7be71a 100644 --- a/resources/views/bo/pages/recipes/form.blade.php +++ b/resources/views/bo/pages/recipes/form.blade.php @@ -241,14 +241,14 @@ 'model' => $recipeModel ?? null, 'step' => 1, 'unsigned' => true, - 'min' => 1, + 'min' => 0, 'max' => 1000, - 'required' => true, + 'required' => false, 'label' => str(__('validation.custom.cooking_time'))->ucFirst(), 'helper' => str( __('validation.between.numeric', [ 'attribute' => __('validation.custom.cooking_time'), - 'min' => 1, + 'min' => 0, 'max' => 1000, ]))->ucFirst(), ]) @@ -295,19 +295,20 @@ ['is_proportionnal', str(__('proportionnel'))->ucFirst()], ], 'itemType' => ['number', 'text', 'text', 'boolean'], - 'itemLimit' => [1, 20], + 'itemLimit' => [1, 25], 'inputPlaceholder' => [ str(__('validation.custom.ingredient'))->ucFirst(), str(__('validation.custom.value'))->ucFirst(), str(__('validation.custom.unit'))->ucFirst(), ], 'required' => true, + 'step' => '0.5', 'helper' => str( __('validation.list_items', [ 'field' => __('validation.custom.ingredient'), 'min' => 3, 'lineMin' => 1, - 'lineMax' => 20, + 'lineMax' => 25, ]))->ucFirst(), ]) @@ -337,7 +338,7 @@ 'model' => __('models.classes.recipe'), ]), 'min' => 3, - 'max' => 255, + 'max' => 500, ]), 'placeholder' => __(':field :inter:model', [ 'field' => str(__('validation.custom.tips'))->ucfirst(), diff --git a/resources/views/bo/pages/static_pages/form.blade.php b/resources/views/bo/pages/static_pages/form.blade.php index 1db6ea07..75b2be77 100644 --- a/resources/views/bo/pages/static_pages/form.blade.php +++ b/resources/views/bo/pages/static_pages/form.blade.php @@ -1,7 +1,6 @@ @use('\App\Enums\StaticPageType', 'StaticPageType')
- @if (!$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product)) + @if (!$staticPageModel->type->equals(StaticPageType::recipe) && !$staticPageModel->type->equals(StaticPageType::product)) {{-- SEO_TITLE --}}
@@ -80,9 +79,10 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::home)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::home)) {{-- TITLE --}}
@@ -112,12 +112,13 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::legals) && - !$staticPageModel->type->equals(StaticPageType::confidentiality) && - !$staticPageModel->type->equals(StaticPageType::accessibility) && - !$staticPageModel->type->equals(StaticPageType::selling)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::legals) && + !$staticPageModel->type->equals(StaticPageType::confidentiality) && + !$staticPageModel->type->equals(StaticPageType::accessibility) && + !$staticPageModel->type->equals(StaticPageType::selling)) {{-- SUBTITLE --}}
@@ -142,7 +143,7 @@ 'model' => trans_choice('models.classes.static_page', 1), ]), 'min' => 3, - 'max' => 255, + 'max' => 500, ]), 'placeholder' => __(':field :inter:model', [ 'field' => str(__('validation.custom.subtitle'))->ucfirst(), @@ -155,10 +156,11 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recruitment) && - !$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::home)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recruitment) && + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::home)) {{-- CONTENT --}}
@@ -189,15 +191,16 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recipes) && - !$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::products) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::home) && - !$staticPageModel->type->equals(StaticPageType::legals) && - !$staticPageModel->type->equals(StaticPageType::confidentiality) && - !$staticPageModel->type->equals(StaticPageType::accessibility) && - !$staticPageModel->type->equals(StaticPageType::selling)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recipes) && + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::products) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::home) && + !$staticPageModel->type->equals(StaticPageType::legals) && + !$staticPageModel->type->equals(StaticPageType::confidentiality) && + !$staticPageModel->type->equals(StaticPageType::accessibility) && + !$staticPageModel->type->equals(StaticPageType::selling)) {{-- PICTURE SECTION --}}
diff --git a/resources/views/bo/partials/inputs/int-color.blade.php b/resources/views/bo/partials/inputs/int-color.blade.php index 23d93b71..d3a8d5ec 100644 --- a/resources/views/bo/partials/inputs/int-color.blade.php +++ b/resources/views/bo/partials/inputs/int-color.blade.php @@ -13,7 +13,7 @@ 'value' => $value ?? old($name, $model->{$name} ?? ''), 'nullable' => !$required, 'disabled' => $disabled ?? false, - 'presetColors' => ["#0f437e", "#4e3238", "#f3ebe4", "#1175b7", "#c7d400", "#fab7d8", "#063", "#e30513", "#212425", "#fbf8f5"], + 'presetColors' => $presetColors ?? ["#0f437e", "#4e3238", "#f3ebe4", "#1175b7", "#c7d400", "#fab7d8", "#063", "#e30513", "#ce6118", "#212425", "#fbf8f5"], ]; @endphp
diff --git a/resources/views/bo/partials/inputs/text-list-items.blade.php b/resources/views/bo/partials/inputs/text-list-items.blade.php index eb9d22c0..1759c8ea 100644 --- a/resources/views/bo/partials/inputs/text-list-items.blade.php +++ b/resources/views/bo/partials/inputs/text-list-items.blade.php @@ -11,6 +11,7 @@ 'inputPlaceholder' => $inputPlaceholder, 'header' => $header ?? false, 'errors' => $errors->getBag('default')->getMessages() ?? [], + 'step' => $step ?? null, ]; @endphp
diff --git a/resources/views/fo/pages/home.blade.php b/resources/views/fo/pages/home.blade.php index fa52f343..5321747d 100644 --- a/resources/views/fo/pages/home.blade.php +++ b/resources/views/fo/pages/home.blade.php @@ -6,38 +6,44 @@ @section('bg-offset', true) @section('content') -
+
{{-- HOT NEWS --}}
!cache('hotNewsIsDisplayed'), ])> -
-
-
- {{ __('Chargement...') }} +
+
+
+
+ {{ __('Chargement...') }} +
+ + @include('fo.partials.hot-news')
- - @include('fo.partials.hot-news')
{{-- MAIN SLIDES --}} @if ($mainSlideModels->isNotEmpty()) -
+
@foreach ($mainSlideModels as $mainSlideModel) -
+
- {{ $mainSlideModel->background_alt }}
@if ($mainSlideModel->picture) - {{ $mainSlideModel->picture_alt }} + {{ $mainSlideModel->picture_alt }} @endif
@endforeach
- + @if ($mainSlideModels->count() >= 2) + + @endif
- {{ __('Footer imitation bois du slider') }}
@endif {{-- HOT NEWS DESKTOP --}}
-
-
- @include('fo.partials.hot-news') +
+
+
+ @include('fo.partials.hot-news') +
{{-- RANGES/PRODUCTS --}} @@ -122,18 +133,18 @@
@php $data = [ - 'legendModels' => $rangeModels ?? [], - 'legendImages' => true, - 'legendField' => 'label', + 'legendModels' => $rangeModels ?? [], + 'legendImages' => true, + 'legendField' => 'label', 'routeBtnIndex' => 'fo.products.index', - 'routeBtnShow' => 'fo.products.search.range', - 'routeAjax' => 'fo.home.products', - 'contentViews' => $productViews, + 'routeBtnShow' => 'fo.products.search.range', + 'routeAjax' => 'fo.home.products', + 'contentViews' => $productViews, 'contentSwiper' => true, - 'texts' => [ + 'texts' => [ 'helperNoItems' => __('Aucun produits disponibles dans cette gammes'), - 'btn1Label' => str(__('découvrir tous les produits'))->upper(), - 'btn2Label' => str(__('découvrir tous nos produits'))->upper(), + 'btn1Label' => str(__('découvrir tous les produits'))->upper(), + 'btn2Label' => str(__('découvrir tous nos produits'))->upper(), ], ]; @endphp @@ -154,9 +165,11 @@
@foreach ($demarcheSlideModels as $demarcheSlideModel)
-
+
{{ __('Paysage de champs') }} + title="{{ __('Image de fond du carrousel') }}" + alt="{{ __('Paysage de champs') }}">
@@ -168,9 +181,13 @@ alt="#FIXME:alt de l'image de la démarche">
-
+
+
-

{{ $demarcheSlideModel->title }}

+

+ {{ $demarcheSlideModel->title }} +

{!! clean($demarcheSlideModel->text) !!}
{{ __('flèche vers la gauche') }} + title="{{ __('Navigation du slider (gauche)') }}" + alt="{{ __('flèche vers la gauche') }}">
@@ -261,9 +280,11 @@ @foreach ($newsModels->slice(4, count($newsModels)) as $newsModel)
  • - -

    {{ now()->subDays(rand(1, 31))->format('d/m/Y') }}

    +

    + {{ now()->subDays(rand(1, 31))->format('d/m/Y') }}

    {{ $newsModel->title }}

  • @@ -286,7 +309,8 @@ 'justify-content-md-end' => $newsModels->slice(4, count($newsModels))->isNotEmpty(), ])> diff --git a/resources/views/fo/pages/news/index.blade.php b/resources/views/fo/pages/news/index.blade.php index 47b382b3..503ebac9 100644 --- a/resources/views/fo/pages/news/index.blade.php +++ b/resources/views/fo/pages/news/index.blade.php @@ -8,12 +8,12 @@ {{-- HEADER --}} @include('fo.layouts.header-banner') {{-- MAIN CONTENT --}} -
    +
    -
    - @include('fo.pages.news.toggleButton') -
    +
    + {{-- @include('fo.pages.news.toggleButton') --}} +
    {!! clean($staticPageModel->content) !!}
    @@ -21,22 +21,22 @@
    @php $data = [ - 'legendModels' => $newsCategories ?? [], - 'legendImages' => false, - 'legendField' => 'title', - 'routeAjax' => 'fo.news.filtered', - 'contentViews' => $newsViews, - 'contentSwiper' => false, + 'legendModels' => $newsCategories ?? [], + 'legendImages' => false, + 'legendField' => 'title', + 'routeAjax' => 'fo.news.filtered', + 'contentViews' => $newsViews, + 'contentSwiper' => false, 'legendFakeFirst' => __('Toutes les actus'), - 'texts' => [ - 'helperNoItems' => __('Aucune actualités disponibles dans cette catégorie'), + 'texts' => [ + 'helperNoItems' => __('Aucune actualités disponibles dans cette catégorie'), 'helperAllItems' => __('Toutes les actualités ont été chargées'), ], ]; @endphp -
    +
    +
    -
    @endsection diff --git a/resources/views/fo/pages/products/show.blade.php b/resources/views/fo/pages/products/show.blade.php index bc45091d..c5383028 100644 --- a/resources/views/fo/pages/products/show.blade.php +++ b/resources/views/fo/pages/products/show.blade.php @@ -293,8 +293,10 @@ @include('fo.partials.commitments.list-pages', [ 'showBtn' => false, ]) - {{ $productModel->banner_alt }} + {{ $productModel->banner_alt ? $productModel->banner_alt : ($productModel->range ? $productModel->range->banner_ambiance_alt : $productModel->subrange->range->banner_ambiance_alt) }}
    {{-- PRODUCT ANIMATION --}} diff --git a/resources/views/fo/pages/recipes/show.blade.php b/resources/views/fo/pages/recipes/show.blade.php index 112b103f..15e8d2d2 100644 --- a/resources/views/fo/pages/recipes/show.blade.php +++ b/resources/views/fo/pages/recipes/show.blade.php @@ -115,13 +115,15 @@ {{ sprintf('%s de préparation', $recipeModel->convertTime($recipeModel->preparation_time)) }}

    -
  • - {{ __('Soupière') }} -

    - {{ sprintf('%s de cuisson', $recipeModel->convertTime($recipeModel->cooking_time)) }} -

    -
  • + @if ($recipeModel->cooking_time > 0) +
  • + {{ __('Soupière') }} +

    + {{ sprintf('%s de cuisson', $recipeModel->convertTime($recipeModel->cooking_time)) }} +

    +
  • + @endif
  • {{ __('Toque') }} diff --git a/resources/views/fo/pages/recruitment.blade.php b/resources/views/fo/pages/recruitment.blade.php index ab008ba7..10592e93 100644 --- a/resources/views/fo/pages/recruitment.blade.php +++ b/resources/views/fo/pages/recruitment.blade.php @@ -129,6 +129,24 @@
  • + {{-- Video Modal --}} + @endif {{-- ADVANTAGES --}}
    diff --git a/resources/views/fo/partials/hot-news.blade.php b/resources/views/fo/partials/hot-news.blade.php index 2b3daf47..f6e61e4c 100644 --- a/resources/views/fo/partials/hot-news.blade.php +++ b/resources/views/fo/partials/hot-news.blade.php @@ -1,26 +1,40 @@ -
    - @foreach($newsModels->filter(fn ($newsModel) => $newsModel->highlight) as $newsModel) - -
    -
    - {{ $newsModel->thumbnail_alt }} +
    +
    + @php $highlightNewsModels = $newsModels->filter(fn($newsModel) => $newsModel->highlight); @endphp + @foreach ($highlightNewsModels as $newsModel) + -
    -
    {{ $newsModel->newsCategory->title }}
    -
    {{ str($newsModel->title)->limit(50) }}
    + @endforeach +
    count() === 2) ? "col-md-4 mx-auto" : "col-md-6"])> +
    + {!! clean($hotNewsSettings->value['text']) !!} +
    +
    + {{ $hotNewsSettings->value['picture_alt'] }} +
    + @money($discountsTotal * 100) + {{ __(' d\'économie') }} +
    -
    - -
    - @endforeach -
    -
    - {!! clean($hotNewsSettings->value['text']) !!} -
    -
    -
    -
    - {{ $hotNewsSettings->value['picture_alt'] }}
    diff --git a/resources/views/fo/partials/recipe-card.blade.php b/resources/views/fo/partials/recipe-card.blade.php index f55ccb1c..298b50aa 100644 --- a/resources/views/fo/partials/recipe-card.blade.php +++ b/resources/views/fo/partials/recipe-card.blade.php @@ -24,11 +24,13 @@ title="{{ __('Icône du temps de préparation') }}" alt="{{ __('Horloge') }}" /> {{ $model->convertTime($model->preparation_time) }}

    -

    - {{ __('Soupière') }} - {{ $model->convertTime($model->cooking_time) }} -

    + @if ($model->cooking_time) +

    + {{ __('Soupière') }} + {{ $model->convertTime($model->cooking_time) }} +

    + @endif

    {{ __('Toque') }} diff --git a/resources/views/fo/partials/testimonial-card.blade.php b/resources/views/fo/partials/testimonial-card.blade.php index c4147d8c..c9081855 100644 --- a/resources/views/fo/partials/testimonial-card.blade.php +++ b/resources/views/fo/partials/testimonial-card.blade.php @@ -1,12 +1,20 @@

    + @if (!empty($model->video_id)) + + + @endif {{ $model->picture_alt }} + @if (!empty($model->video_id)) + + @endif
    + class="line-border-medium position-relative d-flex flex-column testimonial-card-bottom-part px-lg-5 px-lg-4 pb-lg-4 bg-light h-lg-100 px-3 pt-4">

    {{ $model->identity }}