diff --git a/assets/images/view-lot1.png b/assets/images/view-lot1.png deleted file mode 100644 index db2c760..0000000 Binary files a/assets/images/view-lot1.png and /dev/null differ diff --git a/assets/images/view-lot2.png b/assets/images/view-lot2.png deleted file mode 100644 index 1f3bab7..0000000 Binary files a/assets/images/view-lot2.png and /dev/null differ diff --git a/assets/images/win-lot1.png b/assets/images/win-lot1.png deleted file mode 100644 index d3ddc90..0000000 Binary files a/assets/images/win-lot1.png and /dev/null differ diff --git a/assets/images/win-lot2.png b/assets/images/win-lot2.png deleted file mode 100644 index 1f3bab7..0000000 Binary files a/assets/images/win-lot2.png and /dev/null differ diff --git a/theme.config.php b/theme.config.php index d379b8e..6e33624 100644 --- a/theme.config.php +++ b/theme.config.php @@ -3,6 +3,10 @@ return [ 'name' => 'base', 'models' => [ + 'prizes' => [ + 'picture_max_width' => 560, + 'picture_max_height' => 700, + ], 'products' => [ 'picture_max_width' => 550, 'picture_max_height' => 550, @@ -12,4 +16,51 @@ return [ 'picture_max_height' => 355, ], ], + /** + * Format can specifiy to which format save the image + * JPEG PNG GIF TIF BMP ICO PSD WebP + * GD ✔️ ✔️ ✔️ - - - - ✔️ * + * Imagick ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ * + * For WebP support GD driver must be used with PHP 5 >= 5.5.0 or PHP 7 + * in order to use imagewebp(). If Imagick is used, it must be compiled + * with libwebp for WebP support. + * resize => will resize the image (boolean) + * fit => Combine cropping and resizing to format image in a smart way (boolean) + * keepRatio => will keep image ratio wile resizing (boolean) + * trim => boolean to trim the image using border color + * inCanvas => to make sure image boundarie is respected + * format => select tha wantd ouput form, yan can just convert images if you want + * example : + * 'small' => [ + * 'height' => 500, + * 'width' => 250, + * 'inCanvas' => true, + * 'trim' => ['transparent', null, 10] + * ], + * 'smallWebp' => [ + * 'height' => 500, + * 'width' => 250, + * 'inCanvas' => true, + * 'format' => 'webp' + * ], + * 'justconvertImage' => [ + * 'format' => 'webp' + * ] + */ + 'resizes' => [ + 'trimlot1' => [ + 'height' => 700, + 'width' => 560, + 'inCanvas' => true, + 'trim' => ['transparent', null, 10], + 'format' => 'png' + ], + 'trimlot2' => [ + 'height' => 476, + 'width' => 355, + 'inCanvas' => true, + 'trim' => ['transparent', null, 10], + 'format' => 'png' + ] + ] ]; diff --git a/views/notif.remove/notif-win-admin-email.blade.php b/views/notif.remove/notif-win-admin-email.blade.php index 21f7b64..1b4d673 100644 --- a/views/notif.remove/notif-win-admin-email.blade.php +++ b/views/notif.remove/notif-win-admin-email.blade.php @@ -2,7 +2,8 @@

Bonjour,

-

Le lot suivant a été gagné : {{ $participation->instantWin()->first()->prize->label_one }} le {{ \Carbon\Carbon::parse($participation->created_at)->format('d/m/Y à H:i') }}


+

Le lot suivant a été gagné : {{ $participation->instantWin()->first()->prize->label }} le + {{ \Carbon\Carbon::parse($participation->created_at)->format('d/m/Y à H:i') }}


Gagnant :

{{ $participation->user->lastname }} {{ $participation->user->firstname }}

{{ $participation->user->address }}

@@ -10,10 +11,12 @@

{{ $participation->user->address2 }}

@endif

{{ $participation->user->postal_code }} {{ $participation->user->town }} - {{ $participation->user->country }}

-

{{ $participation->user->email }}


-

Codes utilisé@if ($settings->use_ean_codes)s @endif :

+

{{ $participation->user->email }}


+

Codes utilisé@if ($settings->use_ean_codes) + s + @endif :

@if ($settings->use_ean_codes) -

- Code On Pack : {{ $participation->codeEan->code }}

+

- Code On Pack : {{ $participation->codeEan->code }}

@endif

- Code Unique : {{ $participation->code->code_unique }}

diff --git a/views/notif.remove/prize-mail.blade.php b/views/notif.remove/prize-mail.blade.php index 8fada8a..72e407b 100644 --- a/views/notif.remove/prize-mail.blade.php +++ b/views/notif.remove/prize-mail.blade.php @@ -176,7 +176,7 @@
- Vous venez de gagner 1 {{ $prize->label_one ?? 'gain Test' }} en participant à + Vous venez de gagner 1 {{ $prize->label ?? 'gain Test' }} en participant à notre grand jeu Gauloisirs 2022 !
Vous recevrez prochainement votre dotation à votre domicile.
diff --git a/views/notif.remove/winning-proof-email.blade.php b/views/notif.remove/winning-proof-email.blade.php index aaa40eb..b0f0fb3 100644 --- a/views/notif.remove/winning-proof-email.blade.php +++ b/views/notif.remove/winning-proof-email.blade.php @@ -1,19 +1,19 @@

Bonjour,

Vous trouverez en PJ les preuves de gain du joueur suivant :

- Lot : {{ $participation->instantWin()->first()->prize->label_one ?? ''}}
- {{$user->lastname}} {{$user->firstname}}
- {{$user->address}}
+ Lot : {{ $participation->instantWin()->first()->prize->label ?? '' }}
+ {{ $user->lastname }} {{ $user->firstname }}
+ {{ $user->address }}
@if ($user->address2 !== null) - {{$user->address2}}
+ {{ $user->address2 }}
@endif - {{$user->postal_code}} {{$user->town}} - {{$user->country}}
- {{$user->email}} + {{ $user->postal_code }} {{ $user->town }} - {{ $user->country }}
+ {{ $user->email }}

Codes utilisés :

@if ($settings->use_ean_codes) - Code On Pack : {{ $participation->codeEan->code }}
+ Code On Pack : {{ $participation->codeEan->code }}
@endif - Code Unique : {{ $participation->code->code_unique ?? ''}} + Code Unique : {{ $participation->code->code_unique ?? '' }}

diff --git a/views/pages/home.blade.php b/views/pages/home.blade.php index 6be0986..5aed518 100644 --- a/views/pages/home.blade.php +++ b/views/pages/home.blade.php @@ -22,15 +22,14 @@
{{ optional(Arr::get($prizesGlobal, 0))->quantity }} + class="bg-tertiary fs-3 rounded-pill fw-bold px-3 py-1 text-white">{{ Arr::get($prizesGlobal, 0)->quantity }}

- {!! clean(nl2br(__("Wonderbox \nLoisirs"))) !!} + {{ Arr::get($prizesGlobal, 0)->label }}

- {{ __('Wonderbox Loisir en famille') }} + {{ Arr::get($prizesGlobal, 0)->picture_alt }} @endif @if (Arr::has($prizesGlobal, 1)) @@ -41,13 +40,14 @@ class="bg-tertiary fs-3 rounded-pill fw-bold px-3 py-1 text-white">{{ optional(Arr::get($prizesGlobal, 1))->quantity }}

- {!! clean(nl2br(__("Wonderbox \nHappy Day"))) !!} + {{ Arr::get($prizesGlobal, 1)->label }}

-
+
{{ __('Wonderbox Happy Day') }} + src="{{ asset(resize(Arr::get($prizesGlobal, 1)->picture), 'trimlot2') }}" + title="{{ Arr::get($prizesGlobal, 1)->picture_title }}" + alt="{{ Arr::get($prizesGlobal, 1)->picture_alt }}">
{!! clean(nl2br(__("Ou des milliers\n de bons\n de réduction"))) !!} @@ -134,54 +134,45 @@ - - + @foreach ($prizesGlobal as $prizeIndex => $prizeModel) + + @endforeach