💄 add - amélioration de la page principale et du component Content

This commit is contained in:
eric committed 2022-11-13 17:13:53 +01:00
1 parent 9e959f5ac6
commit 77db425b0e
17 files changed
+654 -234

No files matched your search

+28 -76
View File
@@ -5,7 +5,7 @@ import prisma from '../lib/prisma'
import Image from 'next/image';
import * as Yup from 'yup';
import Head from "next/head";
import { useSession } from "next-auth/react";
import { getSession, useSession } from "next-auth/react";
import { yupResolver } from "@hookform/resolvers/yup";
import { useForm } from "react-hook-form";
import Router from "next/router";
@@ -24,6 +24,7 @@ import unAnDeThe from '../public/images/unandethé.png'
import sablier from '../public/images/sablier.png'
import cadeau from '../public/images/cadeau.png'
import jeuConcours from '../public/images/jeuconcours.png'
import { GetServerSideProps } from "next";
@@ -31,6 +32,7 @@ type CodeSubmitForm = {
codeCadeau: string;
};
const MainPage = () => {
const { data: session } = useSession();
@@ -83,82 +85,32 @@ const MainPage = () => {
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
</Head>
<header className={`${style['masthead']} d-flex justify-content-center align-items-center text-center`}>
<div className={`${style['feuilleGauche']}`}>
<Image
src={feuilleGauche}
alt="thetiptop feuille Gauche"
layout="responsive"
className={`${style['rotatingSlow']}`}
<div className={`${style['imageWrapper']}`}>
<Image
src={testerCodeCadeau}
alt="thetiptop navigation logo"
layout="responsive"
className={`${style['rotatingImage']}`}
/>
</div>
<form onSubmit={handleSubmit(onSubmit)}>
<div className="form-group mx-auto my-3 w-100">
<input type="text"
id="codeInput" aria-describedby="codeHelp"
placeholder="A293049430..."
{...register('codeCadeau')}
className={`form-control ${errors.codeCadeau ? 'is-invalid' : ''}`}
/>
<small id="codeHelp" className="form-text text-muted">Code à usage unique</small>
<div className="invalid-feedback">{errors.codeCadeau?.message}</div>
</div>
<div className={`${style['feuilleDroite']}`}>
<Image
src={feuilleDroite}
alt="thetiptop feuille Droite"
layout="responsive"
className={`${style['rotatingSlow']}`}
/>
<div className="form-group mx-auto my-3 w-100">
<button type="submit" className={`${style['aButton']} btn btn-primary`}>Découvrir mon cadeau !</button>
</div>
<div className={`${style['jeuConcours']}`}>
<Image
src={jeuConcours}
alt="thetiptop jeu Concours"
layout="responsive"
className={`${style['rotatingSlow']}`}
/>
</div>
<div className={`${style['cadeau']}`}>
<Image
src={cadeau}
alt="thetiptop cadeau"
layout="responsive"
className={`${style['rotatingSlow']}`}
/>
</div>
<div className="container align-items-center d-flex flex-column">
<div className={`${style['bloc-content']} col-12 col-lg-6`}>
<div className={`${style['imageWrapper']}`}>
<Image
src={testerCodeCadeau}
alt="thetiptop navigation logo"
layout="responsive"
className={`${style['rotatingImage']}`}
/>
</div>
<form onSubmit={handleSubmit(onSubmit)}>
<div className="form-group mx-auto my-3 w-100">
<input type="text"
id="codeInput" aria-describedby="codeHelp"
placeholder="A293049430..."
{...register('codeCadeau')}
className={`form-control ${errors.codeCadeau ? 'is-invalid' : ''}`}
/>
<small id="codeHelp" className="form-text text-muted">Code à usage unique</small>
<div className="invalid-feedback">{errors.codeCadeau?.message}</div>
</div>
<div className="form-group mx-auto my-3 w-100">
<button type="submit" className={`${style['aButton']} btn btn-primary`}>Découvrir mon cadeau !</button>
</div>
</form>
</div>
{/* <div className={`${style['bloc-content']} col-12 col-lg-10 d-flex row my-2 mx-0 py-2 py-lg-2 px-0 px-lg-3 `}>
</form>
{/* <div className={`${style['bloc-content']} col-12 col-lg-10 d-flex row my-2 mx-0 py-2 py-lg-2 px-0 px-lg-3 `}>
<h2 className="col-12 my-2">A gagner</h2>
<div className="col d-flex justify-content-center">
<div className={`${style['productToGain']}`}>
@@ -193,8 +145,8 @@ const MainPage = () => {
</div>
</div>
</div> */}
</div>
</header >
{/* <Section backgroundImagePath={'/images/three-cups-of-tea-steeping.png'}>
<h2>Présentation du jeu concours</h2>