Merge branch 'issue-6' into 'main'

fix teaser counter - #6

See merge request ldc-web/projets/gen-game-web-themes/reghalal/ramadan/ramadan-2024!9
This commit is contained in:
Vincent BRIDIER 2024-01-29 11:39:41 +00:00
commit 22376d66a0
2 changed files with 76 additions and 98 deletions

View file

@ -2,7 +2,7 @@
return [
// * GGW version
'version' => '2.2.4',
'version' => '2.2.7',
// * Theme name
'name' => 'ramadan-2024',
// * Picture BO validation sizes

View file

@ -4,110 +4,88 @@
@section('main-class', 'teaser-page')
@section('content')
{{-- 1st row lots --}}
<section class="row position-relative flex-lg-nowrap main-rotate text-xl-start pt-lg-5 pt-xl-4 text-center" id="teaser">
<div class="col-12 col-lg-6 position-relative d-none d-lg-flex flex-column justify-content-center align-items-center g-0">
<p class="home-dates fs-4 f-barlow-bold position-absolute start-50 w-100 translate-middle-x text-secondary text-center">
{{ Str::of(
__('Du :start_date au :end_date', [
'start_date' => $settingsGlobal->start_date->isoFormat('DD MMMM'),
'end_date' => $settingsGlobal->end_date->isoFormat('DD MMMM'),
]),
)->upper() }}
</p>
<h1 class="home-title mb-0 mt-5 pt-4">
<span class="f-arabdances text-primary">Halal</span><br />
<span class="f-gobold text-tertiary">&</span><span class="text-secondary f-barlow-condensed-semibold">En Famille</span>
</h1>
</div>
<div class="col-12 col-lg-7 g-0">
<div class="container-fluid">
<div class="row">
<div class="col">
<h2 class="text-uppercase text-primary f-barlow-condensed fs-1 fw-bold w-100 w-md-75 m-0 text-center">
{{ __('Jouez et tentez de gagner') }}
</h2>
<section class="position-relative main-rotate text-xl-start pt-lg-5 pt-xl-4 text-center" id="teaser">
<div class="row flex-lg-nowrap">
<div class="col-12 col-lg-6 position-relative d-none d-lg-flex flex-column justify-content-center align-items-center g-0">
<p class="home-dates fs-4 f-barlow-bold position-absolute start-50 w-100 translate-middle-x text-secondary text-center">
{{ Str::of(
__('Du :start_date au :end_date', [
'start_date' => $settingsGlobal->start_date->isoFormat('DD MMMM'),
'end_date' => $settingsGlobal->end_date->isoFormat('DD MMMM'),
]),
)->upper() }}
</p>
<h1 class="home-title mb-0 mt-5 pt-4">
<span class="f-arabdances text-primary">Halal</span><br />
<span class="f-gobold text-tertiary">&</span><span class="text-secondary f-barlow-condensed-semibold">En Famille</span>
</h1>
</div>
<div class="col-12 col-lg-7 g-0">
<div class="container-fluid">
<div class="row">
<div class="col">
<h2 class="text-uppercase text-primary f-barlow-condensed fs-1 fw-bold w-100 w-md-75 m-0 text-center">
{{ __('Jouez et tentez de gagner') }}
</h2>
</div>
</div>
</div>
@if (collect($prizesGlobal)->count())
<div class="row bg-quint p-4">
@if (Arr::has($prizesGlobal, 0))
<div class="col-12 col-sm-6 col-lg-5 g-0 g-sm-2 d-flex align-items-center m-0">
<img class="img-fluid" src="{{ asset(Arr::get($prizesGlobal, 0)->picture) }}"
title="{{ Arr::get($prizesGlobal, 0)->picture_title }}" alt="{{ Arr::get($prizesGlobal, 0)->picture_alt }}">
</div>
<div
class="col-12 col-sm-6 col-lg-5 g-0 py-sm-0 g-sm-2 d-flex flex-column justify-content-center align-items-center align-items-xl-start m-0 pt-2">
<h3 class="fw-bold fs-1 fs-title text-uppercase lh-1 mb-xxl-4 mb-2 text-white">
{{ Arr::get($prizesGlobal, 0)->quantity }}
@if (intval(Arr::get($prizesGlobal, 0)->quantity) > 1)
{{ Str::plural(Arr::get($prizesGlobal, 0)->label) }}
@else
{{ Arr::get($prizesGlobal, 0)->label }}
@endif
</h3>
<h4 class="fw-bold fs-2 text-uppercase lh-1 text-white">{{ __('Et des milliers de bon d’achat') }}</h4>
</div>
@endif
{{-- @if (Arr::has($prizesGlobal, 1))
<div class="col-12 col-sm-6">
<div class="d-flex justify-content-center justify-content-xl-start">
<div class="ms-xl-5 me-2">
<span
class="bg-tertiary fs-3 rounded-pill fw-bold px-3 py-1 text-white">{{ Arr::get($prizesGlobal, 1)->quantity }}</span>
</div>
<h3 class="text-tertiary fw-bold fs-3 text-uppercase lh-1">
@if (intval(Arr::get($prizesGlobal, 1)->quantity) > 1)
{{ Str::plural(Arr::get($prizesGlobal, 1)->label) }}
@if (collect($prizesGlobal)->count())
<div class="row bg-danger p-4">
@if (Arr::has($prizesGlobal, 0))
<div class="col-12 col-sm-6 col-lg-5 g-0 g-sm-2 d-flex align-items-center m-0">
<img class="img-fluid" src="{{ asset(Arr::get($prizesGlobal, 0)->picture) }}"
title="{{ Arr::get($prizesGlobal, 0)->picture_title }}"
alt="{{ Arr::get($prizesGlobal, 0)->picture_alt }}">
</div>
<div
class="col-12 col-sm-6 col-lg-5 g-0 py-sm-0 g-sm-2 d-flex justify-content-center align-items-center justify-content-xl-start m-0 pt-2">
<h3 class="fw-bold fs-1 text-uppercase lh-1 text-white">
{{ Arr::get($prizesGlobal, 0)->quantity }}
@if (intval(Arr::get($prizesGlobal, 0)->quantity) > 1)
{{ Str::plural(Arr::get($prizesGlobal, 0)->label) }}
@else
{{ Arr::get($prizesGlobal, 1)->label }}
{{ Arr::get($prizesGlobal, 0)->label }}
@endif
</h3>
</div>
<img class="img-fluid anti-rotate" src="{{ asset(resize(Arr::get($prizesGlobal, 1)->picture, 'trimlot2')) }}"
title="{{ Arr::get($prizesGlobal, 1)->picture_title }}"
alt="{{ Arr::get($prizesGlobal, 1)->picture_alt }}">
<div class="d-flex align-items-center justify-content-center flex-column flex-lg-row mt-3">
<span class="text-primary fw-bold text-uppercase">{!! clean(nl2br(__("Ou des milliers\n de bons\n de réduction"))) !!}</span>
<img class="img-fluid" src="{{ Vite::asset('resources/theme/mounted/assets/images/br-1-euro.png') }}"
title="{{ __('Réduction de 1 euro') }}" alt="{{ __('Réduction de 1 euro') }}">
</div>
</div>
@endif --}}
</div>
@endif
</div>
@endif
</div>
<img class="picture-100-win position-absolute img-fluid d-none d-lg-inline top-0 mt-3"
src="{{ Vite::asset('resources/theme/mounted/assets/images/pastille.png') }}" alt="{{ __('Grand jeu 100% gagnant') }}">
</div>
</div>
<div class="row">
<div class="col-12">
@php
$counterParts = explode(
'#',
$settingsGlobal->start_date->diffForHumans([
'syntax' => \Carbon\CarbonInterface::DIFF_ABSOLUTE,
'parts' => 3,
'join' => '#',
]),
);
@endphp
@if (collect($counterParts)->count())
<h2 class="d-flex flex-column anti-rotate text-uppercase text-primary fw-bold mt-3 text-center">
<span class="fs-2 f-barlow-condensed">{{ __('Votre jeu sera ouvert dans :time', ['time' => '']) }}</span>
<span class="d-flex justify-content-center flex-row">
@foreach ($counterParts as $counterPart)
<span class="d-flex flex-column m-3">
<span class="my-3">
<span class="text-bg-tertiary rounded-pill p-3">
{{ Str::of($counterPart)->before(' ')->padLeft(2, '0') }}
</span>
</span>
<span class="fs-6 mt-2">{{ Str::of($counterPart)->after(' ')->padBoth(8, "\u{00A0}") }}</span>
</span>
@endforeach
</span>
</h2>
@endif
</div>
<img class="picture-100-win position-absolute img-fluid d-none d-lg-inline top-0 mt-3"
src="{{ Vite::asset('resources/theme/mounted/assets/images/pastille.png') }}" alt="{{ __('Grand jeu 100% gagnant') }}">
</div>
<div class="col-12">
@php
$counterParts = explode(
'#',
$settingsGlobal->start_date->diffForHumans([
'syntax' => \Carbon\CarbonInterface::DIFF_ABSOLUTE,
'parts' => 3,
'join' => '#',
]),
);
@endphp
@if (collect($counterParts)->count())
<h2 class="d-flex flex-column anti-rotate text-uppercase text-primary fw-bold mt-3 text-center">
<span class="fs-2 f-barlow-condensed">{{ __('Votre jeu sera ouvert dans :time', ['time' => '']) }}</span>
<span class="d-flex justify-content-center flex-row">
@foreach ($counterParts as $counterPart)
<span class="d-flex flex-column m-3">
<span class="my-3">
<span class="text-bg-tertiary rounded-pill p-3">
{{ Str::of($counterPart)->before(' ')->padLeft(2, '0') }}
</span>
</span>
<span class="fs-6 mt-2">{{ Str::of($counterPart)->after(' ')->padBoth(8, "\u{00A0}") }}</span>
</span>
@endforeach
</span>
</h2>
@endif
</div>
</section>
@endsection