Sync 12 Re7 prize ok avec Roulette

This commit is contained in:
Jérémy Munsch 2023-12-05 18:41:45 +01:00
parent eccf86b40b
commit e9ee968289
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
22 changed files with 603 additions and 314 deletions

View file

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View file

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View file

@ -19,3 +19,4 @@
@import "./pages/home";
@import "./pages/static_page";
@import "./pages/products";
@import "./pages/won";

9
sass/pages/_won.scss Normal file
View file

@ -0,0 +1,9 @@
@import "./../partials/spin_wheel";
.won-page {
#wheel-wrapper {
position: relative;
width: 16rem;
margin: 0 auto;
}
}

View file

View file

@ -0,0 +1,168 @@
#wheel-wrapper {
* {
padding: 0;
margin: 0;
}
.wheel {
position: relative;
overflow: hidden;
width: 16rem;
height: 16rem;
border: 0.4rem solid #{$color-white};
border-radius: 50%;
margin: 0;
box-shadow: rgb(0 0 0 / 20%) 0 0 10px, rgb(0 0 0 / 5%) 0 3px 0;
transform: rotate(0deg);
&::before {
position: absolute;
z-index: 1000;
left: 0;
width: calc(16rem - 0.2rem * 2);
height: calc(16rem - 0.2rem * 2);
border: 0.2rem solid rgb(0 0 0 / 10%);
border-radius: 50%;
content: "";
}
.wheel-inner {
width: 100%;
height: 100%;
transition: all 6s cubic-bezier(0, 0.99, 0.44, 0.99);
}
.wheel-sec {
position: absolute;
top: -.1rem;
left: -.1rem;
width: 16rem;
height: calc(16rem / 2);
background-origin: border-box;
background-position: center;
background-repeat: no-repeat;
background-size: auto;
opacity: 1;
transform-origin: calc(16rem / 2) calc(16rem / 2);
}
.wheel-spin {
position: absolute;
z-index: 1000;
top: 50%;
left: 50%;
width: 4.2rem;
height: 4.2rem;
border-radius: 50%;
margin: -34px 0 0 -34px;
background: #{$color-white};
box-shadow: rgb(0 0 0 / 10%) 0 3px 0;
cursor: pointer;
font-family: "Exo 2", sans-serif;
user-select: none;
&::before {
position: absolute;
top: -12px;
left: 14px;
width: 0;
height: 0;
border-width: 0 20px 28px;
border-style: solid;
border-color: transparent transparent #{$color-white};
content: "";
}
&::after {
position: relative;
z-index: 100000;
display: block;
width: 4.2rem;
height: 4.2rem;
color: $color-dark;
content: "LANCER";
font-size: .7rem;
line-height: 4.2rem;
text-align: center;
text-shadow: 0 2px 0 #{$color-white}, 0 -1px 0 rgb(0 0 0 / 30%);
}
.wheel-spin-inner {
position: absolute;
z-index: 999;
top: 50%;
left: 50%;
width: 54px;
height: 54px;
border-radius: 50%;
margin: -27px 0 0 -27px;
background: $color-white;
/* Old browsers */
/* stylelint-disable-next-line declaration-property-value-no-unknown */
background: radial-gradient(center, ellipse cover, rgb(255 255 255 / 100%) 0%, rgb(234 234 234 / 100%) 100% ); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0, center center, 100%, color-stop(0%, rgb(255 255 255 / 100%)), color-stop(100%, rgb(234 234 234 / 100%)) ); /* Chrome,Safari4+ */
/* stylelint-disable-next-line declaration-property-value-no-unknown */
background: radial-gradient(center, ellipse cover, rgb(255 255 255 / 100%) 0%, rgb(234 234 234 / 100%) 100% ); /* Chrome10+,Safari5.1+ */
/* stylelint-disable-next-line declaration-property-value-no-unknown */
background: radial-gradient(center, ellipse cover, rgb(255 255 255 / 100%) 0%, rgb(234 234 234 / 100%) 100% ); /* Opera 12+ */
/* stylelint-disable-next-line declaration-property-value-no-unknown */
background: radial-gradient(center, ellipse cover, rgb(255 255 255 / 100%) 0%, rgb(234 234 234 / 100%) 100% ); /* IE10+ */
background: radial-gradient(ellipse at center, rgb(255 255 255 / 100%) 0%, rgb(234 234 234 / 100%) 100% ); /* W3C */
box-shadow: rgb(255 255 255 / 100%) 0 -2px 0 inset, rgb(255 255 255 / 100%) 0 2px 0 inset, rgb(0 0 0 / 40%) 0 0 5px;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eaeaea',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
&:active,&.active {
&::after {
font-size: .8rem;
}
.wheel-spin-inner {
box-shadow: rgb(0 0 0 / 40%) 0 0 5px inset;
}
}
}
.wheel-shine {
position: absolute;
top: 0;
left: 0;
width: 16rem;
height: 16rem; /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0, center center, 100%, color-stop(0%, rgb(255 255 255 / 100%)), color-stop(1%, rgb(255 255 255 / 99%)), color-stop(9%, rgb(255 255 255 / 91%)), color-stop(100%, rgb(255 255 255 / 0%)) ); /* Chrome,Safari4+ */ /* Chrome10+,Safari5.1+ */ /* Opera 12+ */
/* stylelint-disable-next-line declaration-property-value-no-unknown */
background: radial-gradient(center, ellipse cover, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 99%) 1%, rgb(255 255 255 / 91%) 9%, rgb(255 255 255 / 0%) 100% ); /* IE10+ */
background: radial-gradient(ellipse at center, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 99%) 1%, rgb(255 255 255 / 91%) 9%, rgb(255 255 255 / 0%) 100% ); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
opacity: 0.1;
}
}
/* ANIMATION */
@keyframes hh {
0%,
100% {
transform: rotate(0deg);
}
50% {
transform: rotate(7deg);
}
}
@keyframes hh {
0%,
100% {
transform: rotate(0deg);
}
50% {
transform: rotate(7deg);
}
}
.spin { /* Chrome, Safari, Opera */
animation: hh 0.1s;
}
}

View file

@ -13,6 +13,7 @@ import "./base/common";
// PAGES
import "./pages/home";
import "./pages/products";
import "./pages/won";
// Cookies
import CookieNotice from "@ldc-web/cookie-notice";

94
ts/pages/won.ts Normal file
View file

@ -0,0 +1,94 @@
document.addEventListener("DOMContentLoaded", function () {
if (!document.querySelector("main.won-page")) {
return;
}
const wheelWrapper = document.getElementById("wheel-wrapper"),
spinWheelInner = wheelWrapper?.querySelector(".wheel-inner") as HTMLElement | null | undefined,
spinWheelBtnList = wheelWrapper?.querySelectorAll(".wheel-spin") as NodeListOf<HTMLElement> | undefined,
prizeSection = document.getElementById("prize-section"),
discountSection = document.getElementById("discount-section");
/** Hide animation and show win sections */
const toggleAnimationPhase = () => {
if (wheelWrapper) {
wheelWrapper.classList.add("d-none");
}
if (prizeSection) {
prizeSection.classList.remove("d-none");
}else if (discountSection) {
discountSection.classList.remove("d-none");
} else {
throw new Error("No section to toggle");
}
};
if (wheelWrapper && spinWheelInner && spinWheelBtnList && spinWheelBtnList.length) {
let clicks: number = 0;
// * Set default degree (360*5) soit 5 tours
const degree: number = (360 * 5),
wheelPartsDeg: number = 360 / spinWheelInner.children.length,
thisWinAngle: number = (Number.parseInt(
String(wheelWrapper.dataset["winChild"])
// On s'aligne sur la tranche on on ajoute entre 10% et 90% d'une part
)) * wheelPartsDeg - 45 + (wheelPartsDeg * (Math.random() * (0.9 - 0.1) + 0.1));
let timeout: NodeJS.Timeout | null = null;
const spinTheWheel = () => {
// * Add 1 every click
/**
* Multiply the degree by number of clicks
* generate random number between 1 - 85,
* then add to the new degree
*/
const newDegree = degree * ++clicks;
const totalDegree = newDegree + thisWinAngle;
/**
* Let's make the spin btn to tilt every
* time the edge of the section hits
* the indicator
*/
spinWheelInner.style["transform"] = `rotate(${totalDegree}deg)`;
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(toggleAnimationPhase, 7000);
};
/** ! Même Algo que sur GGW legacy */
spinWheelBtnList.forEach((spinBtn) => {
spinBtn.addEventListener("click", spinTheWheel);
spinBtn.addEventListener("keydown", (kbdEvt: KeyboardEvent) => {
if (
kbdEvt.key == " " ||
kbdEvt.code == "Space" ||
kbdEvt.keyCode == 32 ||
kbdEvt.key == "Enter" ||
kbdEvt.code == "Enter" ||
kbdEvt.keyCode == 13
) {
spinBtn.classList.add("active");
spinTheWheel();
kbdEvt.preventDefault();
}
});
spinBtn.addEventListener("keyup", (kbdEvt: KeyboardEvent) => {
if (
kbdEvt.key == " " ||
kbdEvt.code == "Space" ||
kbdEvt.keyCode == 32 ||
kbdEvt.key == "Enter" ||
kbdEvt.code == "Enter" ||
kbdEvt.keyCode == 13
) {
spinBtn.classList.remove("active");
kbdEvt.preventDefault();
}
});
});
} else {
toggleAnimationPhase();
}
});

View file

@ -1,24 +1,27 @@
<!-- Meta -->
{{-- Meta --}}
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
{{-- blade-formatter-disable --}}
@hasSection('metaIndex')
<meta name="robots" content="@yield('metaIndex')">
<meta name="robots" content="@yield('metaIndex')">
@else
<meta name="robots" content="index, follow">
<meta name="robots" content="index, follow">
@endif
{{-- blade-formatter-enable --}}
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="description" content="@yield('description')">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Open Graph -->
<meta property="og:title" content="{{ $settingsGlobal->name ?? config('app.name') }} - @yield('title')" />
{{-- Open Graph --}}
{{-- blade-formatter-disable-next-line --}}
<meta property="og:title" content="{{ $settingsGlobal->name ?? config('app.name') }} @hasSection('title') - @yield('title')@endif" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ config('app.url') }}" />
<meta property="og:site_name" content="{{ config('app.name') }}" />
<meta property="og:image" content="" />
<meta property="og:description" content="@yield('description')" />
<!-- Favicon -->
{{-- Favicon --}}
{{-- GENERER favicon avec un outil https://realfavicongenerator.net/ --}}
<link href="{{ asset('apple-touch-icon.png') }}" rel="apple-touch-icon" sizes="180x180">
<link type="image/png" href="{{ asset('favicon-32x32.png') }}" rel="icon" sizes="32x32">
@ -28,22 +31,25 @@
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="theme-color" content="#ffffff">
<!-- Others -->
<title>{{ $settingsGlobal->name ?? config('app.name') }} - @yield('title')</title>
{{-- Others --}}
{{-- blade-formatter-disable-next-line --}}
<title>{{ $settingsGlobal->name ?? config('app.name') }}@hasSection('title') - @yield('title')@endif</title>
{{-- blade-formatter-disable --}}
@hasSection('canonical')
<link href="@yield('canonical')" rel="canonical" />
@else
<link href="{{ \config('app.url') }}/{{ \request()->path() }}" rel="canonical" />
@endif
{{-- blade-formatter-enable --}}
{{-- STYLES --}}
@vite(['resources/theme/mounted/sass/fo.scss'])
@stack('styles')
{{-- DEBUG --}}
@if (config('app.debug'))
<script nonce="{{ $nonce }}">
window.vueDebug = true;
</script>
@endif
@hasSection('canonical')
<link href="@yield('canonical')" rel="canonical" />
@else
<link href="{{ \config('app.url') }}/{{ \request()->path() }}" rel="canonical" />
@endif
<!-- STYLES -->
@vite(['resources/theme/mounted/sass/fo.scss'])
@stack('styles')
<!-- Fonts -->
<link href="//fonts.gstatic.com" rel="dns-prefetch">

View file

@ -1,6 +1,6 @@
<div class="col-12 col-lg-6">
<div class="d-flex flex-row">
<a class="d-block flex-grow-1 d-flex @if (!request()->routeis('re7.*') and !request()->routeis('fo.teaser')) game-logo-banner @endif" href="{{ route('fo.homepage') }}"
<a class="d-block flex-grow-1 d-flex @if (!request()->routeis('re7.teaser') and !request()->routeis('fo.teaser')) game-logo-banner @endif" href="{{ route('fo.homepage') }}"
title="{{ __('Aller sur la page d\'accueil') }}">
<span class="d-inline-block">
<img class="img-fluid" src="{{ Vite::asset('resources/theme/mounted/assets/images/home_logo.png') }}"

View file

@ -1,8 +1,5 @@
@extends('theme::layout')
@section('title', __('Jeu :site_name', ['site_name' => $settingsGlobal->name]))
@section('description', __('Jeu :site_name', ['site_name' => $settingsGlobal->name]))
@section('main-class', 'home-page')
@section('content')
{{-- 1st row lots --}}

View file

@ -1,6 +1,20 @@
@extends('theme::layout')
@section('title', __('Perdu'))
@section('description', __('Vous avez perdu, retentez votre chance'))
@section('main-class', 'loose-page')
@section('content')
<p>C'est perdu</p>
<p><a class="btn btn-success" href="{{ route('fo.saisir-code') }}">Rejouer !</a></p>
<div class="container pb-5 pt-5 text-center">
<div class="row mb-3 mt-5">
<div class="col">
<h1 class="text-quad text-uppercase fw-bold">{{ __('C\'est perdu') }}</h1>
</div>
</div>
<div class="row mb-5">
<div class="col">
<a class="btn btn-lg btn-success" href="{{ route('fo.saisir-code') }}">{{ __('Rejouer !') }}</a>
</div>
</div>
</div>
@endsection

View file

@ -0,0 +1,62 @@
<section class="container pb-5 pt-5 text-center" id="{{ $sectionId }}">
<div class="row mb-3 mt-5">
<div class="col">
<h1 class="text-tertiary text-uppercase fw-bold">{{ __('Lancez la roue et découvrez votre gain') }}</h1>
</div>
</div>
<div class="row mb-5">
<div class="col">
{{-- SPIN WHEEL --}}
{{-- blade-formatter-disable --}}
@php
$prizesIdList = \App\Models\Prize::query()->pluck('id');
$brPicture = Vite::asset('resources/theme/mounted/assets/images/animations/br-spin.png');
$lotWbHappy = Vite::asset('resources/theme/mounted/assets/images/animations/wb-happy-spin.png');
$lotWbFamilly = Vite::asset('resources/theme/mounted/assets/images/animations/wb-famille-spin.png');
/** ID => picture */
$wheelParts = collect([
[$brPicture, 'br'],
[$lotWbHappy, $prizesIdList->get(0)],
[$brPicture, 'br'],
[$lotWbFamilly, $prizesIdList->get(1)],
]);
// * Quel fragment va tomber
$spinChild = !empty($prizeModel) ? $wheelParts->search(fn($wheelPart) => Arr::get($wheelPart, 1) === $prizeModel->id) : null;
$spinChild = (is_null($spinChild) and $winDiscount) ? $wheelParts->search(fn($wheelPart) => Arr::get($wheelPart, 1) === 'br') : $spinChild;
@endphp
{{-- blade-formatter-enable --}}
<div id="wheel-wrapper" data-win-child={{ $spinChild }}>
<div class="wheel">
<div class="wheel-inner">
@foreach ($wheelParts as $wheelPartIndex => $wheelPart)
<div class="wheel-sec"></div>
@endforeach
@push('styles')
@foreach ($wheelParts as $wheelPartIndex => $wheelPart)
<style nonce="{{ $nonce }}">
#wheel-wrapper .wheel .wheel-sec:nth-child({{ $wheelPartIndex + 1 }}) {
background-image: url("{{ Arr::get($wheelPart, 0) }}");
transform: rotate({{ $wheelPartIndex * (360 / count($wheelParts)) }}deg);
}
</style>
@endforeach
@endpush
</div>
<div class="wheel-spin" data-bs-toggle="tooltip" title="{{ __('Lancer la roulette pour connaitre mon gain') }}"
role="button" tabindex="0">
<div class="wheel-spin-inner"></div>
</div>
<div class="wheel-shine"></div>
</div>
<div class="mt-4">
<button class="wheel-spin fs-4 btn btn-lg btn-tertiary p-3" data-bs-toggle="tooltip"
title="{{ __('Lancer la roulette pour connaitre mon gain') }}">{{ __('Lancez la roulette !') }}</button>
</div>
</div>
</div>
</div>
</section>

View file

@ -0,0 +1,40 @@
<section class="main--bloc container">
<div class="mobile--menu">
<div class="title--bloc view-br">
<div class="title--txt">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<!-- <br>Votre bon a été envoyé à l'adresse e-mail indiqué lors de votre inscription au jeu (en cas de non réception, vérifiez dans vos courriers indésirables. Attention, le mail peut parfois mettre quelques minutes à vous parvenir). Vous pouvez également y accéder en cliquant sur le bouton ci-dessous. -->
<p>Vous avez gagné un bon d'achat de {{ number_format($coupon->face_value, 2) }}€<br>{{ $coupon->valid_on }}</p>
<div class="main-btn">
<a href="{{ $crmCoupon->link }}" target="_blank">Imprimer ma réduction</a>
</div>
</div>
<div class="bg-opacity"></div>
</div>
<div class="play--bloc">
<p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{ route('fo.saisir-code') }}">Je rejoue</a>
</div>
</div>
</div>
<div class="desktop--menu">
<div class="img--bloc view-br"></div>
<div class="txt--bloc">
<div class="bloc--rotate">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<p>Vous avez gagné un bon d'achat de {{ number_format($coupon->face_value, 2) }}€<br>{{ $coupon->valid_on }}</p>
<div class="main-btn">
<a href="{{ $crmCoupon->link }}" target="_blank">Imprimer ma réduction</a>
</div>
<p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{ route('fo.saisir-code') }}">Je rejoue</a>
</div>
</div>
</div>
</div>
</section>

View file

@ -0,0 +1,45 @@
<section class="container pb-5 pt-5 text-center" id="{{ $sectionId }}">
<div class="mobile--menu">
<div class="title--bloc view-lot1">
<div class="title--txt">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<p class="info2">Vous avez gagné un {{ $prizeModel->label_one }} !<br>
Pour recevoir votre cadeau, vous devez envoyer vos preuves d'achat.
Voir modalités ci dessous.
</p>
</div>
<div class="bg-opacity"></div>
</div>
<div class="play--bloc">
<div class="main-btn">
<a href="#winproof">>></a>
</div>
</div>
{{-- <div class="play--bloc">
<p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{route('saisir-code')}}">Je rejoue</a>
</div>
</div> --}}
</div>
<div class="desktop--menu">
<div class="img--bloc view-lot1"></div>
<div class="txt--bloc">
<div class="bloc--rotate">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<p>Vous avez gagné un {{ $prizeModel->label_one }} !<br>
Pour recevoir votre cadeau, vous devez envoyer vos preuves d'achat.
Voir modalités ci dessous.
</p>
<div class="main-btn">
<a href="#winproof">>></a>
</div>
{{-- <p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{route('saisir-code')}}">Je rejoue</a>
</div> --}}
</div>
</div>
</div>
</section>

View file

@ -0,0 +1,95 @@
<div class="register floating grid">
<div class="head-bloc"></div>
<section class="main--bloc container" style="display:none;">
<div class="title-inscription1">
<a id="winproof"></a>
<h1 class="post-title">Envoyez vos preuves de gain</h1>
</div>
<div class="form-inscription1">
<div class="infos">
<h2>En ligne @</h3>
<p>Renseignez l'adresse à laquelle vous souhaitez recevoir votre gain et téléversez vos preuves d'achat.</p>
</div>
<form method="POST" action="{{ route('fo.send-winning-proof') }}" enctype="multipart/form-data">
@method('PUT')
@csrf
<div class="coordonnees grid">
<h4>Vos coordonnées</h4>
<input id="lastname" name="lastname" type="text" value="{{ Auth::user()->lastname ?? '' }}" placeholder="Nom*"
required maxlength="150">
<input id="firstname" name="firstname" type="text" value="{{ Auth::user()->firstname ?? '' }}" placeholder="Prénom*"
required maxlength="150">
<input id="addr1" name="address" type="text" value="{{ Auth::user()->address ?? '' }}" placeholder="Adresse*"
required maxlength="50">
<input id="addr2" name="address2" type="text" value="{{ Auth::user()->address2 ?? '' }}"
placeholder="Complément d'adresse" maxlength="50">
<div class="locate">
<input id="post_number" name="postal_code" type="number" value="{{ Auth::user()->postal_code ?? '' }}"
placeholder="Code Postal*" required min="1" max="99999">
<input id="town" name="town" type="text" value="{{ Auth::user()->town ?? '' }}" placeholder="Ville*"
required maxlength="50">
</div>
<input id="country" name="country" type="text" value="{{ Auth::user()->country ?? '' }}" placeholder="Pays*"
required maxlength="32">
<input id="phone" name="phone" type="tel" value="{{ Auth::user()->phone ?? '' }}"
placeholder="Numéro de téléphone*" required>
</div>
<div class="preuves">
<h4>Vos preuves d'achat</h4>
<div class="barres files-accepted">
<p>Code-barres du produit*</p><br><br>
<label class="lbl-code upload" for="file-code">Ajouter un fichier</label>
<input class="input-file" id="file-code" name="barcode" type="file" accept=".jpg,.jpeg,.png,.pdf" required>
</div>
<div class="ticket files-accepted">
<p>Ticket de caisse avec la date*</p><br><br>
<label class="lbl-ticket upload" for="ticket-prod">Ajouter un fichier</label>
<input class="input-file" id="ticket-prod" name="ticket" type="file" accept=".jpg,.jpeg,.png,.pdf" required>
</div>
<div class="sticker files-accepted">
<p>Sticker du produit*</p><br><br>
<label class="lbl-sticker upload" for="sticker-prod">Ajouter un fichier</label>
<input class="input-file" id="sticker-prod" name="sticker" type="file" accept=".jpg,.jpeg,.png,.pdf" required>
</div>
</div>
<div class="btn-form">
<input class="btn" id="send" type="submit" value="Envoyer mes preuves d'achat">
</div>
</form>
</div>
<div class="legals">
<p>*Champs obligatoires</p>
</div>
<div class="instructions">
<div class="contain-courrier">
<div class="courrier">
<div class="infos">
<h2>Ou Par courrier</h3>
<p>Merci de nous envoyer, sur papier libre (ou en utilisant le formulaire <a
href="{{ asset($prizeModel->pdf_winning_proof) }}" style="font-size: inherit;line-height:inherit;"
target="_blank"> téléchargeable ici</a>), vos
coordonnées ainsi que vos preuves d'achat originales. Le tout sous pli suffisamment affranchi sous dix jours
à l'adresse suivante :</p>
</div>
<div class="adress">
<p>Service Consommateurs LDC<br>Jeu "Gau'loisirs"<br>CS 50925<br>72302 SABL&Eacute; SUR SARTHE CEDEX</p>
</div>
<div class="coordonnees">
<p>Vos coordonnées<br>Nom, prénom, adresse complète,<br>n° de téléphone et E-mail</p>
</div>
<div class="preuves">
<p>Vos preuves d'achat<br>Code-barres original du produit,<br>ticket de caisse original avec la date,
<br>le sticker ou ou la partie de l'emballage contenant le code unique de jeu (code visible)
</p>
</div>
</div>
</div>
</div>
</section>
</div>

View file

@ -0,0 +1,44 @@
@extends('theme::layout')
@section('title', __('Vous avez gagné !'))
@section('description', __('Vous avez gagné un Lot cliquez sur la roue pour découvrir lequel'))
@section('main-class', 'won-page')
@section('content')
{{-- SPIN WHEEL --}}
@include('theme::pages.participation.parts.animation', [
'sectionId' => 'spin-animation',
'winDiscount' => !empty($prizeModel) ? false : true,
'prizeModel' => $prizeModel ?? null,
])
@if (!empty($prizeModel))
{{-- LOT --}}
@include('theme::pages.participation.parts.prize', [
'sectionId' => 'prize-section',
'prizeModel' => $prizeModel,
])
@elseif (!empty($discount))
{{-- COUPON --}}
@include('theme::pages.participation.parts.discount', [
'sectionId' => 'discount-section',
'discount' => $discount,
])
@else
@php
throw new \RuntimeException('Unhandled win case');
@endphp
@endif
@endsection
@push('scripts')
<script>
//set default degree (360*5)
var degree = 1800;
//number of clicks = 0
var clicks = 0;
var thisWinAngle = 1400;
</script>
@endpush

View file

@ -1,86 +0,0 @@
@extends('theme::layout')
@section('title', 'Réduction')
@section('content')
<div class="congratulate floating grid">
<div class="head-bloc"></div>
<div class="sc__wrapper container">
<h1 class="post-title raleway">Lancez la roue et<br>découvrez votre gain</h1>
<!-- spinwheel --->
<div id="wrapper">
<div id="wheel">
<div id="inner-wheel">
<div class="sec"><span class="fab fa-bell-o"></span></div>
<div class="sec"><span class="fab fa-comment-o"></span></div>
<div class="sec"><span class="fab fa-smile-o"></span></div>
<div class="sec"><span class="fab fa-heart-o"></span></div>
</div>
<div id="spin">
<div id="inner-spin"></div>
</div>
<div id="shine"></div>
</div>
<div id="txt"></div>
</div>
</div>
<section class="main--bloc container">
<div class="mobile--menu">
<div class="title--bloc view-br">
<div class="title--txt">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<!-- <br>Votre bon a été envoyé à l'adresse e-mail indiqué lors de votre inscription au jeu (en cas de non réception, vérifiez dans vos courriers indésirables. Attention, le mail peut parfois mettre quelques minutes à vous parvenir). Vous pouvez également y accéder en cliquant sur le bouton ci-dessous. -->
<p>Vous avez gagné un bon d'achat de {{ number_format($coupon->face_value, 2) }}€<br>{{ $coupon->valid_on }}</p>
<div class="main-btn">
<a href="{{ $crmCoupon->link }}" target="_blank">Imprimer ma réduction</a>
</div>
</div>
<div class="bg-opacity"></div>
</div>
<div class="play--bloc">
<p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{ route('fo.saisir-code') }}">Je rejoue</a>
</div>
</div>
</div>
<div class="desktop--menu">
<div class="img--bloc view-br"></div>
<div class="txt--bloc">
<div class="bloc--rotate">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<p>Vous avez gagné un bon d'achat de {{ number_format($coupon->face_value, 2) }}€<br>{{ $coupon->valid_on }}</p>
<div class="main-btn">
<a href="{{ $crmCoupon->link }}" target="_blank">Imprimer ma réduction</a>
</div>
<p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{ route('fo.saisir-code') }}">Je rejoue</a>
</div>
</div>
</div>
</div>
</section>
</div>
@endsection
@push('scripts')
<script>
//set default degree (360*5)
var degree = 1800;
//number of clicks = 0
var clicks = 0;
var thisWinAngle = 1490;
</script>
@endpush

View file

@ -1,200 +0,0 @@
@extends('theme::layout')
@section('title')
{{ $prizesGlobal[0]->gain_view->name }}
@endsection
@section('content')
<div class="congratulate floating gain1 grid">
<div class="head-bloc"></div>
<div class="sc__wrapper container">
<h1 class="post-title raleway">Lancez la roue et<br>découvrez votre gain</h1>
<!-- spinwheel --->
<div id="wrapper">
<div id="wheel">
<div id="inner-wheel">
<div class="sec"><span class="fab fa-bell-o"></span></div>
<div class="sec"><span class="fab fa-comment-o"></span></div>
<div class="sec"><span class="fab fa-smile-o"></span></div>
<div class="sec"><span class="fab fa-heart-o"></span></div>
</div>
<div id="spin">
<div id="inner-spin"></div>
</div>
<div id="shine"></div>
</div>
<div id="txt"></div>
</div>
</div>
<section class="main--bloc container">
<div class="mobile--menu">
<div class="title--bloc view-lot1">
<div class="title--txt">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<p class="info2">Vous avez gagné un {{ $prizesGlobal[0]->label_one }} !<br>
Pour recevoir votre cadeau, vous devez envoyer vos preuves d'achat.
Voir modalités ci dessous.
</p>
</div>
<div class="bg-opacity"></div>
</div>
<div class="play--bloc">
<div class="main-btn">
<a href="#winproof">>></a>
</div>
</div>
{{-- <div class="play--bloc">
<p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{route('saisir-code')}}">Je rejoue</a>
</div>
</div> --}}
</div>
<div class="desktop--menu">
<div class="img--bloc view-lot1"></div>
<div class="txt--bloc">
<div class="bloc--rotate">
<h1 class="post-title">Félicitations&nbsp;!</h1>
<p>Vous avez gagné un {{ $prizesGlobal[0]->label_one }} !<br>
Pour recevoir votre cadeau, vous devez envoyer vos preuves d'achat.
Voir modalités ci dessous.
</p>
<div class="main-btn">
<a href="#winproof">>></a>
</div>
{{-- <p class="strong">Vous possédez un autre code&nbsp;?</p>
<div class="main-btn">
<a href="{{route('saisir-code')}}">Je rejoue</a>
</div> --}}
</div>
</div>
</div>
</section>
</div>
</div>
<div class="register floating grid">
<div class="head-bloc"></div>
<section class="main--bloc container" style="display:none;">
<div class="title-inscription1">
<a id="winproof"></a>
<h1 class="post-title">Envoyez vos preuves de gain</h1>
</div>
<div class="form-inscription1">
<div class="infos">
<h2>En ligne @</h3>
<p>Renseignez l'adresse à laquelle vous souhaitez recevoir votre gain et téléversez vos preuves d'achat.</p>
</div>
<form method="POST" action="{{ route('fo.send-winning-proof') }}" enctype="multipart/form-data">
@method('PUT')
@csrf
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<div class="coordonnees grid">
<h4>Vos coordonnées</h4>
<input id="lastname" name="lastname" type="text" value="{{ Auth::user()->lastname ?? '' }}" placeholder="Nom*"
required maxlength="150">
<input id="firstname" name="firstname" type="text" value="{{ Auth::user()->firstname ?? '' }}" placeholder="Prénom*"
required maxlength="150">
<input id="addr1" name="address" type="text" value="{{ Auth::user()->address ?? '' }}" placeholder="Adresse*"
required maxlength="50">
<input id="addr2" name="address2" type="text" value="{{ Auth::user()->address2 ?? '' }}"
placeholder="Complément d'adresse" maxlength="50">
<div class="locate">
<input id="post_number" name="postal_code" type="number" value="{{ Auth::user()->postal_code ?? '' }}"
placeholder="Code Postal*" required min="1" max="99999">
<input id="town" name="town" type="text" value="{{ Auth::user()->town ?? '' }}" placeholder="Ville*"
required maxlength="50">
</div>
<input id="country" name="country" type="text" value="{{ Auth::user()->country ?? '' }}" placeholder="Pays*"
required maxlength="32">
<input id="phone" name="phone" type="tel" value="{{ Auth::user()->phone ?? '' }}"
placeholder="Numéro de téléphone*" required>
</div>
<div class="preuves">
<h4>Vos preuves d'achat</h4>
<div class="barres files-accepted">
<p>Code-barres du produit*</p><br><br>
<label class="lbl-code upload" for="file-code">Ajouter un fichier</label>
<input class="input-file" id="file-code" name="barcode" type="file" accept=".jpg,.jpeg,.png,.pdf" required>
</div>
<div class="ticket files-accepted">
<p>Ticket de caisse avec la date*</p><br><br>
<label class="lbl-ticket upload" for="ticket-prod">Ajouter un fichier</label>
<input class="input-file" id="ticket-prod" name="ticket" type="file" accept=".jpg,.jpeg,.png,.pdf"
required>
</div>
<div class="sticker files-accepted">
<p>Sticker du produit*</p><br><br>
<label class="lbl-sticker upload" for="sticker-prod">Ajouter un fichier</label>
<input class="input-file" id="sticker-prod" name="sticker" type="file" accept=".jpg,.jpeg,.png,.pdf"
required>
</div>
</div>
<div class="btn-form">
<input class="btn" id="send" type="submit" value="Envoyer mes preuves d'achat">
</div>
</form>
</div>
<div class="legals">
<p>*Champs obligatoires</p>
</div>
<div class="instructions">
<div class="contain-courrier">
<div class="courrier">
<div class="infos">
<h2>Ou Par courrier</h3>
<p>Merci de nous envoyer, sur papier libre (ou en utilisant le formulaire <a
href="{{ Vite::asset('fichiers/pdf/' . $prizesGlobal[0]->pdf_winning_proof) }}"
style="font-size: inherit;line-height:inherit;" target="_pdf"> téléchargeable ici</a>), vos
coordonnées ainsi que vos preuves d'achat originales. Le tout sous pli suffisamment affranchi sous dix jours
à l'adresse suivante :</p>
</div>
<div class="adress">
<p>Service Consommateurs LDC<br>Jeu "Gau'loisirs"<br>CS 50925<br>72302 SABL&Eacute; SUR SARTHE CEDEX</p>
</div>
<div class="coordonnees">
<p>Vos coordonnées<br>Nom, prénom, adresse complète,<br>n° de téléphone et E-mail</p>
</div>
<div class="preuves">
<p>Vos preuves d'achat<br>Code-barres original du produit,<br>ticket de caisse original avec la date,
<br>le sticker ou ou la partie de l'emballage contenant le code unique de jeu (code visible)
</p>
</div>
</div>
</div>
</div>
</section>
</div>
@endsection
@push('scripts')
<script>
//set default degree (360*5)
var degree = 1800;
//number of clicks = 0
var clicks = 0;
var thisWinAngle = 1400;
</script>
@endpush

View file

@ -1,7 +1,7 @@
@extends('theme::layout')
@section('title', __('Produits porteurs'))
@section('description', __('Les produits porteurs'))
@section('description', __('Les produits porteurs de l\'offre du jeu'))
@section('main-class', 'product-page')

View file

@ -1,6 +1,5 @@
@extends('theme::layout-teaser')
@section('title', __('Jeu :site_name', ['site_name' => $settingsGlobal->name]))
@section('description', __('Le jeu :site_name vas bientôt ouvrir', ['site_name' => $settingsGlobal->name]))
@section('main-class', 'teaser-page')