From 58a90547fe95c0897b6a288a7c3fa42e450d4250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 6 Dec 2023 12:11:42 +0100 Subject: [PATCH] Sync 15 FIX prizes with image resizer --- sass/pages/_home.scss | 6 ++-- theme.config.php | 13 ++++---- views/pages/home.blade.php | 22 +++++++++----- .../pages/participation/parts/prize.blade.php | 30 ++++++++++--------- 4 files changed, 41 insertions(+), 30 deletions(-) diff --git a/sass/pages/_home.scss b/sass/pages/_home.scss index aec0ac2..b0278e0 100644 --- a/sass/pages/_home.scss +++ b/sass/pages/_home.scss @@ -47,14 +47,14 @@ } .carousel-item { - height: 55rem; + min-height: 55rem; @include media-breakpoint-up(sm) { - height: 48rem; + min-height: 48rem; } @include media-breakpoint-up(md) { - height: 40rem; + min-height: 40rem; } } diff --git a/theme.config.php b/theme.config.php index 6e33624..0ade548 100644 --- a/theme.config.php +++ b/theme.config.php @@ -49,15 +49,16 @@ return [ */ 'resizes' => [ 'trimlot1' => [ - 'height' => 700, - 'width' => 560, + 'height' => 600, + 'width' => 400, 'inCanvas' => true, - 'trim' => ['transparent', null, 10], - 'format' => 'png' + 'fit' => true, + 'format' => 'webp' ], 'trimlot2' => [ - 'height' => 476, - 'width' => 355, + 'height' => 400, + 'width' => 400, + 'fit' => true, 'inCanvas' => true, 'trim' => ['transparent', null, 10], 'format' => 'png' diff --git a/views/pages/home.blade.php b/views/pages/home.blade.php index 5aed518..5a0383b 100644 --- a/views/pages/home.blade.php +++ b/views/pages/home.blade.php @@ -25,7 +25,11 @@ class="bg-tertiary fs-3 rounded-pill fw-bold px-3 py-1 text-white">{{ Arr::get($prizesGlobal, 0)->quantity }}

- {{ Arr::get($prizesGlobal, 0)->label }} + @if (intval(Arr::get($prizesGlobal, 0)->quantity) > 1) + {{ Str::plural(Arr::get($prizesGlobal, 0)->label) }} + @else + {{ Arr::get($prizesGlobal, 0)->label }} + @endif

{{ optional(Arr::get($prizesGlobal, 1))->quantity }} + class="bg-tertiary fs-3 rounded-pill fw-bold px-3 py-1 text-white">{{ Arr::get($prizesGlobal, 1)->quantity }}

- {{ Arr::get($prizesGlobal, 1)->label }} + @if (intval(Arr::get($prizesGlobal, 1)->quantity) > 1) + {{ Str::plural(Arr::get($prizesGlobal, 1)->label) }} + @else + {{ Arr::get($prizesGlobal, 1)->label }} + @endif

{{ Arr::get($prizesGlobal, 1)->picture_alt }}
@@ -148,11 +156,11 @@
@if ($loop->index === 0) {{-- RESIZE FOR SPECIFIC PRIZE PICTURE --}} - {{ $prizeModel->picture_alt }} @elseif ($loop->index === 1) {{-- RESIZE FOR SPECIFIC PRIZE PICTURE --}} - {{ $prizeModel->picture_alt }} @else