diff --git a/sass/base/_layout.scss b/sass/base/_layout.scss index 2bd6dce..c33da02 100644 --- a/sass/base/_layout.scss +++ b/sass/base/_layout.scss @@ -1 +1,81 @@ -// Empty. +body { + > header { + .rest-in-game-banner { + &::before { + background-color: $color-primary; + content: ' '; + } + } + } + + > footer { + .share { + width: 1.6rem; + } + + .list-inline { + .list-inline-item { + &::after { + right: 0; + display: inline-block; + width: 0.2rem; + margin-left: 0.8rem; + background-color: $color-light; + content: '\00A0'; + } + + &:last-child::after { + display: none; + } + } + } + + svg { + fill: $color-light; + } + + .downlink { + > a { + display: inline-block; + } + } + + @include media-breakpoint-up(md) { + .downlink { + position: relative; + height: 6rem; + + > a { + position: absolute; + top: -6rem; + left: 50%; + width: 11rem; + max-height: 8rem; + transform: translateX(-50%); + + > span { + position: relative; + top: -3rem; + } + } + } + } + + #page-up { + position: fixed; + right: 0; + bottom: 0; + display: none; + padding: 0; + margin-right: 1rem; + + img { + width: 3rem; + } + + &.show { + display: block; + } + } + } +} diff --git a/sass/fo.scss b/sass/fo.scss index 087760c..7a221c0 100644 --- a/sass/fo.scss +++ b/sass/fo.scss @@ -4,6 +4,7 @@ @import "./utilities/variables"; // * VENDOR +@import "@ldc-web/cookie-notice"; @import "./vendor/bootstrap"; // * BASE @@ -11,3 +12,6 @@ @import "./base/fonts"; @import "./base/common"; @import "./base/layout"; + +// * PAGES +@import "./pages/home"; diff --git a/sass/pages/.gitkeep b/sass/pages/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/sass/pages/_home.scss b/sass/pages/_home.scss new file mode 100644 index 0000000..aec0ac2 --- /dev/null +++ b/sass/pages/_home.scss @@ -0,0 +1,87 @@ +.home-page { + .picture-100-win { + left: 40%; + transform: translateX(-60%); + } + + @include media-breakpoint-up(xl) { + .main-rotate { + transform: rotateZ(-5deg); + } + + .anti-rotate { + transform: rotateZ(5deg); + } + } + + .badge-vertical { + width: 4rem; + padding: 0.8rem; + + @include media-breakpoint-up(md) { + width: 7rem; + padding: 1.3rem; + } + + &::after { + display: block; + width: 0.4rem; + height: 200%; + margin: 0 auto; + background-color: $color-white; + content: ' '; + } + + &:last-child::after { + display: none; + } + } + + .picture-products { + max-width: 20rem; + } + + #carousel-lots { + .carousel-text-pannel { + max-width: 40rem; + } + + .carousel-item { + height: 55rem; + + @include media-breakpoint-up(sm) { + height: 48rem; + } + + @include media-breakpoint-up(md) { + height: 40rem; + } + } + + img { + max-height: 20rem; + + @include media-breakpoint-up(md) { + max-height: inherit; + } + } + + .main-rotate { + transform: rotateZ(-1deg); + } + + .anti-rotate { + transform: rotateZ(1deg); + } + + @include media-breakpoint-up(md) { + .main-rotate { + transform: rotateZ(-5deg); + } + + .anti-rotate { + transform: rotateZ(5deg); + } + } + } +} diff --git a/sass/vendor/_bootstrap.scss b/sass/vendor/_bootstrap.scss index 513133f..f2ded4e 100644 --- a/sass/vendor/_bootstrap.scss +++ b/sass/vendor/_bootstrap.scss @@ -36,6 +36,7 @@ @import "bootstrap/scss/utilities"; @import "bootstrap/scss/close"; @import "bootstrap/scss/breadcrumb"; +@import "bootstrap/scss/carousel"; // 6. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss` @import "bootstrap/scss/utilities/api"; diff --git a/ts/base/common.ts b/ts/base/common.ts index 696ea68..7c31875 100644 --- a/ts/base/common.ts +++ b/ts/base/common.ts @@ -41,4 +41,27 @@ document.addEventListener("DOMContentLoaded", function () { }); }, 300); } + + const scrollTop = (target: string, offset: number = 0) => { + const targetElement = document.getElementById(target); + if (!targetElement) throw new Error(`scrollTop requires ${target} to exist`); + const top = targetElement.getBoundingClientRect().top, + t = window.scrollY + top - offset; + scrollTo({ + top: t, + behavior: "smooth" + }); + }; + + const pageUp = document.getElementById("page-up"); + if (pageUp) { + pageUp.addEventListener("click", () => scrollTop("content-container", 150)), + document.addEventListener("scroll", () => { + if (window.scrollY > 250) { + pageUp.classList.add("show"); + return; + } + pageUp.classList.remove("show"); + }); + } }); diff --git a/ts/fo.ts b/ts/fo.ts index ae13302..3aa8c24 100644 --- a/ts/fo.ts +++ b/ts/fo.ts @@ -10,6 +10,9 @@ import "./utilities/vue-fo"; // CUSTOM import "./base/common"; +// PAGES +import "./pages/home"; + // Cookies import CookieNotice from "@ldc-web/cookie-notice"; window.CookieNotice = CookieNotice; diff --git a/ts/index.d.ts b/ts/index.d.ts index e63fb02..48020d5 100644 --- a/ts/index.d.ts +++ b/ts/index.d.ts @@ -2,9 +2,6 @@ export { }; import type CookieNotice from "@ldc-web/cookie-notice"; import { AxiosStatic } from "axios"; -// import type { -// Axios -// } from "./../../../ts/front-definition.d.ts"; declare global { diff --git a/ts/pages/.gitkeep b/ts/pages/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/ts/pages/home.ts b/ts/pages/home.ts new file mode 100644 index 0000000..f684535 --- /dev/null +++ b/ts/pages/home.ts @@ -0,0 +1,46 @@ +import { Carousel } from "bootstrap"; + +document.addEventListener("DOMContentLoaded", function () { + + if (!document.querySelector("main.home-page")) { + return; + } + + + // * BR Carousel (With BS) + const lotsCarousel = document.getElementById("carousel-lots"); + if (lotsCarousel) { + const playPauseBtn = document.getElementById("coupons-carousel-play-btn"); + const carousel = Carousel.getOrCreateInstance(lotsCarousel, { + // * Start cycle on swipe (or play btn) + ride: true + }); + let isRunning = false; + + if (playPauseBtn) { + const updatePlayBtnStatus = () => { + // * Toggle once + if (!isRunning) { + playPauseBtn.children.item(0)?.classList.remove("d-none"); + playPauseBtn.children.item(1)?.classList.add("d-none"); + } else { + playPauseBtn.children.item(0)?.classList.add("d-none"); + playPauseBtn.children.item(1)?.classList.remove("d-none"); + } + }; + playPauseBtn.addEventListener("click", () => { + if (isRunning) { + carousel.pause(true); + } else { + carousel.cycle(); + } + isRunning = !isRunning; + updatePlayBtnStatus(); + }); + lotsCarousel.addEventListener("slide.bs.carousel", () => { + isRunning = true; + updatePlayBtnStatus(); + }); + } + } +}); diff --git a/ts/utilities/fontawesome.ts b/ts/utilities/fontawesome.ts index 5d12d53..489163f 100644 --- a/ts/utilities/fontawesome.ts +++ b/ts/utilities/fontawesome.ts @@ -27,7 +27,9 @@ import { faEyeSlash, faFolderOpen, faListUl, + faPause, faPencil, + faPlay, faPlus, faQuestionCircle, faRedoAlt, @@ -79,12 +81,12 @@ library.add(faListUl); library.add(faBan); library.add(faCircleExclamation); library.add(faCircleInfo); - -// Front library.add(faChevronLeft); library.add(faChevronRight); library.add(faCircleXmark); library.add(faCircleNotch); library.add(faSliders); +library.add(faPlay); +library.add(faPause); dom.watch(); diff --git a/views/fo/confirm-email.blade.php b/views/fo/confirm-email.blade.php index 29c4b1c..41e038c 100644 --- a/views/fo/confirm-email.blade.php +++ b/views/fo/confirm-email.blade.php @@ -11,7 +11,7 @@ @if ($result === true)

Compte activé avec succès, vous pouvez désormais vous connecter

- Se connecter + Se connecter
@if (session('success'))
@@ -34,7 +34,7 @@

Cliquez sur le bouton ci-dessous pour vous inscrire.

- Je m'inscris + Je m'inscris
@endif diff --git a/views/fo/enter-code.blade.php b/views/fo/enter-code.blade.php index cc93a79..07e8827 100644 --- a/views/fo/enter-code.blade.php +++ b/views/fo/enter-code.blade.php @@ -16,14 +16,15 @@
Sticker jeu 100% gagnant
-
+
@csrf
- +
* Champs obligatoires diff --git a/views/fo/forgot-password.blade.php b/views/fo/forgot-password.blade.php index eb3f7d0..3952c5d 100644 --- a/views/fo/forgot-password.blade.php +++ b/views/fo/forgot-password.blade.php @@ -10,7 +10,7 @@
@if (!isset($tokenValid) || !$tokenValid)

Mot de passe oublié

- + @method('PUT') @csrf @if ($errors->any()) @@ -37,7 +37,7 @@ @elseif ($tokenValid)

Changement de votre mot de passe

-
+ @method('PUT') @csrf @if ($errors->any()) diff --git a/views/fo/home.blade.php b/views/fo/home.blade.php deleted file mode 100644 index 182b24b..0000000 --- a/views/fo/home.blade.php +++ /dev/null @@ -1,210 +0,0 @@ -@extends('theme::fo.layout') - -@section('title', 'Accueil') - -@section('content') -
-
-
-
-
- -

-
- -
-

-
-
-

Jouez et tentez de gagner

-
-
-
-
- {{ $prizesGlobal[0]->quantity }} -
-

Wonderbox
Loisirs

- -
-
- Grand jeu 100% gagnant -
- Grand jeu 100% gagnant -
-
-
-
-
-
- {{ $prizesGlobal[1]->quantity }} -
-

Wonderbox
Happy Day

-
-
- Wonderbox Happy Day -
-
-

Ou des milliers
de bons
de réduction

- Wonderbox Happy Day -
-
-
- -
- Jouer ! -
-
-
-
- -
-
-
-
-

Comment jouer ?

-

Rien de plus simple ! Suivez les 3 étapes décrites à droite et laissez-vous guider.

- -
-
-
-
-
-
- Acheter un produit porteur de l'offre -
-
-

Achetez un produit Le Gaulois porteur de l'offre.

- -
-
-
-
- Trouver le code au dos du sticker -
-
-

Trouvez le code au dos du sticker, soit en le décollant du produit, soit en lisant en transparence.

-
-
-
-
- Inscrivez-vous sur ce site -
-
-

Inscrivez-vous sur ce site, insérez votre code et découvrez ce que vous avez gagné !

-
-
-
-
-
- -
-
-
-

Les cadeaux

-
-
-
-
-
- Wonderbox Loisirs -
-
-
-

Wonderbox
loisirs

-

1 activité pour 2 à 6 personnes

-

- 1640 activités en famille : cinéma, visite d’un zoo ou d’un château, spectacle au théâtre, cirque, balade en - bateau, randonnée équestre, atelier culinaire… - Les petits et les grands vont se régaler : sortie à l’aquarium de Paris pour faire connaissance avec ses 10 - 000 pensionnaires, atelier culinaire pour savourer une bonne dose de bonheur, découverte du bassin de la - Villette en bateau électrique, rencontre avec le nouveau monde de Mini World Lyon… -

-
-
-
-
-
- Wonbderbox Happy Day -
-
-
-

Wonderbox
Happy Day

-

1 activité pour 1 à 2 personnes

-

- Plus de 2500 activités : laser game, bowling, balade en canoë, cinéma, repas, dégustation de macarons… - Besoin d’une super activité pour déconnecter ? Soyez prêts, vous allez adorer cette journée : parties de - bowling endiablées à Châlons-en-Champagne, séance de Taï Chi ou de Wing Chung à Bordeaux ou pizza à déguster - face à Notre-Dame de Paris… Voici tout ce dont vous avez besoin pour apprécier un Happy Day ! -

-
-
-
-
-
-
-
- Jouer ! -
-
- -
- - {{-- -

Société : {{$settingsGlobal->company}} et nom du jeu : {{$settingsGlobal->name}}

-

-

-

-

Lots (valeur à 0 ou 1 : 0 = faux, 1 = vrai) :

- - - - - - - - - - - - - - @foreach ($prizesGlobal as $p) - - - - - - - - - - - - @endforeach - -
ID ArcadiaLabel singulierLabel plurielQuantitéNotification activéFormulaire suppl.ID mail ArcadiaPdf preuve de gainLot par défaut
{{$p->arcadia_id}}{{$p->label_one}}{{$p->label_many}}{{$p->quantity}}{{$p->notifications}}{{$p->additional_form}}{{$p->arcadia_mail_id}}{{$p->pdf_winning_proof}}{{$p->need_proof}}
- - @if (isset($prizesGlobal[0])) - {{$prizesGlobal[0]->label_one}} - @endif ---}} -@endsection diff --git a/views/fo/kit.blade.php b/views/fo/kit.blade.php index fb56c7f..52c0c3d 100644 --- a/views/fo/kit.blade.php +++ b/views/fo/kit.blade.php @@ -44,7 +44,7 @@

En ligne @

Renseignez l'adresse à laquelle vous souhaitez recevoir votre gain et téléversez vos preuves d'achat.

- + @method('PUT') @csrf @if ($errors->any()) diff --git a/views/fo/layout.blade.php b/views/fo/layout.blade.php index 9b398fd..b854e17 100644 --- a/views/fo/layout.blade.php +++ b/views/fo/layout.blade.php @@ -1,46 +1,24 @@ - - @yield('title') - {{ $settingsGlobal->name }} - +@include('theme::fo.layouts.head') - - {{-- GENERER favicon avec un outil https://realfavicongenerator.net/ --}} - - - - - - - + +
+ @include('theme::fo.layouts.header') +
- - - {{-- - - --}} - - +
+ @yield('content') +
- - +
+ @include('theme::fo.layouts.footer') +
- - - - - - -
- @include('theme::fo.partials.header') -
- - @yield('content') - - @include('theme::fo.partials.footer') - + {{-- @include('theme::fo.cookie') --}} + @include('theme::vendor.cn-cookies') + @vite(['resources/theme/mounted/ts/fo.ts']) @stack('scripts') diff --git a/views/fo/layouts/footer.blade.php b/views/fo/layouts/footer.blade.php new file mode 100644 index 0000000..438d91b --- /dev/null +++ b/views/fo/layouts/footer.blade.php @@ -0,0 +1,64 @@ +
+
+ {{-- Share LINKS --}} +
+ {{ __('Partagez le jeu sur') }} + + + {{ __('Découvrez tous nos produits sur :link', ['link' => '']) }} + Legaulois.fr + +
+ + {{-- LINKS --}} + +
+ +
+ + + +@push('scripts') + + +@endpush diff --git a/views/fo/layouts/head.blade.php b/views/fo/layouts/head.blade.php new file mode 100644 index 0000000..33aea4c --- /dev/null +++ b/views/fo/layouts/head.blade.php @@ -0,0 +1,49 @@ + + + +@hasSection('metaIndex') + +@else + +@endif + + + + + + + + + + + + + +{{-- GENERER favicon avec un outil https://realfavicongenerator.net/ --}} + + + + + + + + + +{{ $settingsGlobal->name ?? config('app.name') }} - @yield('title') +@if (config('app.debug')) + +@endif +@hasSection('canonical') + +@else + +@endif + + +@vite(['resources/theme/mounted/sass/fo.scss']) +@stack('styles') + + + diff --git a/views/fo/layouts/header.blade.php b/views/fo/layouts/header.blade.php new file mode 100644 index 0000000..4b2129a --- /dev/null +++ b/views/fo/layouts/header.blade.php @@ -0,0 +1,92 @@ +{{--
+ + + +
--}} + + diff --git a/views/fo/livres.blade.php b/views/fo/livres.blade.php index 1bb51ec..c2d29fa 100644 --- a/views/fo/livres.blade.php +++ b/views/fo/livres.blade.php @@ -44,7 +44,7 @@

En ligne @

Renseignez l'adresse à laquelle vous souhaitez recevoir votre gain et téléversez vos preuves d'achat.

-
+ @method('PUT') @csrf @if ($errors->any()) diff --git a/views/fo/login.blade.php b/views/fo/login.blade.php index b2df7ad..ef4a381 100644 --- a/views/fo/login.blade.php +++ b/views/fo/login.blade.php @@ -23,7 +23,7 @@
diff --git a/views/fo/register-crm.blade.php b/views/fo/register-crm.blade.php index 929c4f9..4715a29 100644 --- a/views/fo/register-crm.blade.php +++ b/views/fo/register-crm.blade.php @@ -20,14 +20,14 @@ @endif
-
+ @csrf

Votre profil

+ + + + --> @@ -57,7 +57,7 @@
- +
diff --git a/views/fo/replay.blade.php b/views/fo/replay.blade.php index 78c5be9..2a69cda 100644 --- a/views/fo/replay.blade.php +++ b/views/fo/replay.blade.php @@ -11,7 +11,7 @@

 

 

- Je rejoue + Je rejoue
diff --git a/views/fo/verifyemail.blade.php b/views/fo/verifyemail.blade.php index 1db1cc8..6d57519 100644 --- a/views/fo/verifyemail.blade.php +++ b/views/fo/verifyemail.blade.php @@ -192,7 +192,7 @@ - Je confirme mon inscription diff --git a/views/fo/winning-proof.blade.php b/views/fo/winning-proof.blade.php index ea595ac..dce5771 100644 --- a/views/fo/winning-proof.blade.php +++ b/views/fo/winning-proof.blade.php @@ -4,7 +4,7 @@ @section('content')

Envoyer vos preuves de gain

- + @method('PUT') @csrf @if ($errors->any()) diff --git a/views/vendor/cn-cookies.blade.php b/views/vendor/cn-cookies.blade.php index ad7c6db..68de6ec 100644 --- a/views/vendor/cn-cookies.blade.php +++ b/views/vendor/cn-cookies.blade.php @@ -4,7 +4,7 @@ $site_name = Str::ucfirst(config('app.name')); $logo_picture_url = Vite::asset('resources/theme/mounted/assets/images/home_logo.png', 'build'); $logo_alt_text = "Logo {$site_name}"; -$confidentiality_page_url = route('fo.policies.show'); +$confidentiality_page_url = route('fo.charte'); $strings = (object)[ 'button_customize_cookies' => __('cookie-notice.button_customize_cookies'), @@ -78,7 +78,7 @@ SCRIPT; @endphp {{-- INCLUDE TEMPLATE --}} -@include('vendor.cookie-notice-templates.standard', compact( +@include('theme::vendor.cookie-notice-templates.standard', compact( 'site_name', 'logo_picture_url', 'logo_alt_text', 'confidentiality_page_url', 'strings' )) diff --git a/views/fo/cookie.blade.php b/views/vendor/cookie.blade.php similarity index 98% rename from views/fo/cookie.blade.php rename to views/vendor/cookie.blade.php index f27dc7d..14d51a8 100644 --- a/views/fo/cookie.blade.php +++ b/views/vendor/cookie.blade.php @@ -42,7 +42,7 @@ dans votre navigateur afin de se souvenir de ne pas suivre vos préférences. Certaines fonctionnalités ne seront pas accessibles. Vous pouvez changer d’avis et modifier votre consentement à tout moment en revenant sur ce site. - Pour en savoir plus sur les cookies que nous utilisons, consultez notre
charte de + Pour en savoir plus sur les cookies que nous utilisons, consultez notre charte de confidentialité.

@@ -105,7 +105,7 @@
@push('scripts') - + --}} @endpush