💄 add - amélioration de la page principale et du component Content
This commit is contained in:
1 parent
9e959f5ac6
commit
77db425b0e
17 files changed
+653
-233
No files matched your search
@@ -0,0 +1,78 @@
|
||||
import React from "react";
|
||||
|
||||
|
||||
import Image from 'next/image';
|
||||
|
||||
|
||||
import style from '../styles/Content.module.css';
|
||||
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
|
||||
import feuilleGauche from '../public/images/feuilleGauche.png'
|
||||
import feuilleDroite from '../public/images/feuilleBasDroite.png'
|
||||
import cadeau from '../public/images/cadeau.png'
|
||||
import jeuConcours from '../public/images/jeuconcours.png'
|
||||
import footerGrass from '../public/images/footer_image.png'
|
||||
|
||||
|
||||
type Props = {
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
const Content = ({ children }: Props) => {
|
||||
return (
|
||||
<>
|
||||
<div 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>
|
||||
<div className={`${style['feuilleDroite']}`}>
|
||||
<Image
|
||||
src={feuilleDroite}
|
||||
alt="thetiptop feuille Droite"
|
||||
layout="responsive"
|
||||
className={`${style['rotatingSlow']}`}
|
||||
/>
|
||||
</div>
|
||||
<div className={`${style['jeuConcours']}`}>
|
||||
<Image
|
||||
src={jeuConcours}
|
||||
alt="thetiptop jeu Concours"
|
||||
layout="responsive"
|
||||
className={`${style['zoomInOutCadeau']}`}
|
||||
/>
|
||||
</div>
|
||||
<div className={`${style['cadeau']}`}>
|
||||
<Image
|
||||
src={cadeau}
|
||||
alt="thetiptop cadeau"
|
||||
layout="responsive"
|
||||
className={`${style['zoomInOutJeuConcours']}`}
|
||||
/>
|
||||
</div>
|
||||
<div className="container align-items-center d-flex flex-column">
|
||||
<div className={`${style['bloc-content']} col-12 col-lg-6`}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
<div className={`${style['footerGrass']}`}>
|
||||
<Image
|
||||
src={footerGrass}
|
||||
alt="thetiptop feuille Gauche"
|
||||
layout="responsive"
|
||||
// className={`${style['footerGrass']}`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Content;
|
||||
@@ -2,12 +2,13 @@ import Image from 'next/image'
|
||||
import logo from '../public/images/logo.png';
|
||||
import logoInstagram from '../public/images/logo instagram.png';
|
||||
import logoLinkedin from '../public/images/logo linkedin.png';
|
||||
import style from '../styles/Footer.module.css'
|
||||
|
||||
import Link from 'next/link';
|
||||
|
||||
const Footer = () => {
|
||||
return (
|
||||
<footer className="py-3 my-2 my-lg-5 footer">
|
||||
<footer className={`${style.footer}`}>
|
||||
<div className="container border-bottom">
|
||||
<div className="row align-items-center">
|
||||
<div className="col-sm-6 col-md-3 d-flex justify-content-center">
|
||||
@@ -52,19 +53,19 @@ const Footer = () => {
|
||||
<ul className="nav flex-column justify-content-md-around justify-content-sm-center mx-5">
|
||||
<li className="nav-item">
|
||||
<Link href="/CGU" legacyBehavior>
|
||||
<a className='nav-link px-2 text-muted'>CGU</a>
|
||||
<a className='px-2'>CGU</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li className="nav-item">
|
||||
<Link href="/mentions-legales" legacyBehavior>
|
||||
<a className='nav-link px-2 text-muted'>Mentions légales</a>
|
||||
<a className='px-2'>Mentions légales</a>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-center text-muted">Thé Tip Top © 2022 - projet fictif pour lequel aucun réel
|
||||
<p className="text-center">Thé Tip Top © 2022 - projet fictif pour lequel aucun réel
|
||||
achat ou aucune réservation ne pourrait être effectué.</p>
|
||||
</footer>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { ReactNode } from "react";
|
||||
import NavBar from "./NavBar";
|
||||
import Footer from "./Footer";
|
||||
|
||||
import Content from "./Content";
|
||||
|
||||
type Props = {
|
||||
children?: React.ReactNode;
|
||||
@@ -10,7 +10,7 @@ type Props = {
|
||||
const Layout = ({ children }: Props) =>
|
||||
<div>
|
||||
<NavBar />
|
||||
{children}
|
||||
<Content children={children} />
|
||||
<Footer />
|
||||
</div>
|
||||
|
||||
|
||||
+10
-11
@@ -5,17 +5,14 @@ import { useRouter } from "next/router";
|
||||
import { signOut, useSession } from "next-auth/react";
|
||||
import style from '../styles/NavBar.module.css';
|
||||
import Image from 'next/image';
|
||||
import { UserProps } from "../types/user";
|
||||
|
||||
|
||||
|
||||
|
||||
const NavBar = ({ role, email }: UserProps) => {
|
||||
const NavBar = () => {
|
||||
|
||||
const navRef = useRef<HTMLInputElement>();
|
||||
|
||||
const router = useRouter();
|
||||
const { data: session, status } = useSession();
|
||||
console.log('role', session)
|
||||
|
||||
const closeNav = () => {
|
||||
navRef.current.style.height = "0%";
|
||||
@@ -41,7 +38,9 @@ const NavBar = ({ role, email }: UserProps) => {
|
||||
<Link href="/" legacyBehavior><a className={style.link} >Accueil</a></Link> |
|
||||
<Link href="/contact" legacyBehavior><a className={style.link} >Nos produits</a></Link> |
|
||||
<Link href="/" legacyBehavior><a className={style.link} >Contactez-nous</a></Link> |
|
||||
<Link href="/user" legacyBehavior><a className={style.link} >Connexion</a></Link>
|
||||
<Link href="/login" legacyBehavior><a className={style.link} >Connexion</a></Link>
|
||||
|
||||
|
||||
</div>
|
||||
<div className={`justify-content-center text-center ${style['show-mobile']}`}>
|
||||
<span className={`${style.burgerButton}`} onClick={openNav}>☰</span>
|
||||
@@ -51,12 +50,12 @@ const NavBar = ({ role, email }: UserProps) => {
|
||||
|
||||
<div ref={navRef} className={style.overlay} onClick={closeNav}>
|
||||
|
||||
<a href="javascript:void(0)" className={style.closebtn} onClick={closeNav}>×</a>
|
||||
<a className={style.closebtn} onClick={closeNav}>×</a>
|
||||
<div className="overlay-content">
|
||||
<a href="#">About</a>
|
||||
<a href="#">Services</a>
|
||||
<a href="#">Clients</a>
|
||||
<a href="#">Contact</a>
|
||||
<Link href="/" legacyBehavior><a className={style.link} >Accueil</a></Link> |
|
||||
<Link href="/contact" legacyBehavior><a className={style.link} >Nos produits</a></Link> |
|
||||
<Link href="/" legacyBehavior><a className={style.link} >Contactez-nous</a></Link> |
|
||||
<Link href="/user" legacyBehavior><a className={style.link} >Connexion</a></Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Generated
+15
@@ -19,6 +19,7 @@
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-hook-form": "^7.39.2",
|
||||
"react-icons": "^4.6.0",
|
||||
"react-markdown": "8.0.3",
|
||||
"yup": "^0.32.11"
|
||||
},
|
||||
@@ -1993,6 +1994,14 @@
|
||||
"react": "^16.8.0 || ^17 || ^18"
|
||||
}
|
||||
},
|
||||
"node_modules/react-icons": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.6.0.tgz",
|
||||
"integrity": "sha512-rR/L9m9340yO8yv1QT1QurxWQvWpbNHqVX0fzMln2HEb9TEIrQRGsqiNFQfiv9/JEUbyHmHPlNTB2LWm2Ttz0g==",
|
||||
"peerDependencies": {
|
||||
"react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
|
||||
@@ -3974,6 +3983,12 @@
|
||||
"integrity": "sha512-rCeCa1+sIcgI9PjgGmev9bVqHCwYwhjkbsXitr+giQ/P0mf/AGwUBtCdKC1lRu7egrxbLwqO9cWNWpXW4FrsHA==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-icons": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.6.0.tgz",
|
||||
"integrity": "sha512-rR/L9m9340yO8yv1QT1QurxWQvWpbNHqVX0fzMln2HEb9TEIrQRGsqiNFQfiv9/JEUbyHmHPlNTB2LWm2Ttz0g==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-is": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-hook-form": "^7.39.2",
|
||||
"react-icons": "^4.6.0",
|
||||
"react-markdown": "8.0.3",
|
||||
"yup": "^0.32.11"
|
||||
},
|
||||
|
||||
@@ -24,4 +24,21 @@ const options = {
|
||||
],
|
||||
adapter: PrismaAdapter(prisma),
|
||||
secret: process.env.SECRET,
|
||||
callbacks: {
|
||||
async session({ session, user }) {
|
||||
|
||||
const getCurrentUser = await prisma.user.findMany({
|
||||
where: { email: session.user.email },
|
||||
})
|
||||
//récupération du role
|
||||
const { role } = getCurrentUser[0];
|
||||
|
||||
session.user.role = role
|
||||
|
||||
|
||||
|
||||
return session
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+28
-76
@@ -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>
|
||||
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
import React from "react";
|
||||
import Layout from "../components/Layout";
|
||||
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 { yupResolver } from "@hookform/resolvers/yup";
|
||||
import { useForm } from "react-hook-form";
|
||||
import Router from "next/router";
|
||||
|
||||
import Section from '../components/Section';
|
||||
import style from '../styles/Index.module.css';
|
||||
|
||||
import rotatingLeftImage from '../public/images/coffret-degustation-mousselines-individuelles-n3-PhotoRoom.png';
|
||||
import rotatingRightImage from '../public/images/coffret-the-PhotoRoom.png';
|
||||
import Link from "next/link";
|
||||
|
||||
import testerCodeCadeau from '../public/images/testerlecode.png'
|
||||
import feuilleGauche from '../public/images/feuilleGauche.png'
|
||||
import feuilleDroite from '../public/images/feuilleBasDroite.png'
|
||||
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'
|
||||
|
||||
|
||||
|
||||
type CodeSubmitForm = {
|
||||
codeCadeau: string;
|
||||
};
|
||||
|
||||
const MainPage = () => {
|
||||
const { data: session } = useSession();
|
||||
|
||||
const validationSchema = Yup.object().shape({
|
||||
codeCadeau: Yup.string().trim().required("Vous n'avez pas rentrer de code cadeau !"),
|
||||
});
|
||||
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors }
|
||||
} = useForm<CodeSubmitForm>({
|
||||
resolver: yupResolver(validationSchema)
|
||||
});
|
||||
|
||||
const onSubmit = async (data: CodeSubmitForm) => {
|
||||
|
||||
if (!session) {
|
||||
return <Layout>
|
||||
<p>Vous devez vous connecter pour tester votre !</p>
|
||||
</Layout>
|
||||
}
|
||||
|
||||
|
||||
|
||||
// try {
|
||||
// const body = { bioValue: data.bio };
|
||||
// await fetch(`/api/profile`, {
|
||||
// method: "POST",
|
||||
// headers: { "Content-Type": "application/json" },
|
||||
// body: JSON.stringify(body),
|
||||
// })
|
||||
// .then((res) => res.json())
|
||||
// .then((data) => {
|
||||
// setResponse(data);
|
||||
// console.log('response', data);
|
||||
// })
|
||||
// await Router.push("/profile");
|
||||
// } catch (error) {
|
||||
// console.error(error);
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Home App</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<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>
|
||||
<div className={`${style['feuilleDroite']}`}>
|
||||
<Image
|
||||
src={feuilleDroite}
|
||||
alt="thetiptop feuille Droite"
|
||||
layout="responsive"
|
||||
className={`${style['rotatingSlow']}`}
|
||||
/>
|
||||
</div>
|
||||
<div className={`${style['jeuConcours']}`}>
|
||||
<Image
|
||||
src={jeuConcours}
|
||||
alt="thetiptop jeu Concours"
|
||||
layout="responsive"
|
||||
className={`${style['zoomInOutCadeau']}`}
|
||||
/>
|
||||
</div>
|
||||
<div className={`${style['cadeau']}`}>
|
||||
<Image
|
||||
src={cadeau}
|
||||
alt="thetiptop cadeau"
|
||||
layout="responsive"
|
||||
className={`${style['zoomInOutJeuConcours']}`}
|
||||
/>
|
||||
</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 `}>
|
||||
<h2 className="col-12 my-2">A gagner</h2>
|
||||
<div className="col d-flex justify-content-center">
|
||||
<div className={`${style['productToGain']}`}>
|
||||
<Image
|
||||
src={rotatingRightImage}
|
||||
alt="coffret de thé marron rempli de sachets de toutes couleurs"
|
||||
fill
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col d-flex justify-content-center">
|
||||
<div className={`${style['productToGain']}`}>
|
||||
<Image
|
||||
src={rotatingRightImage}
|
||||
alt="coffret de thé marron rempli de sachets de toutes couleurs"
|
||||
fill
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col d-flex justify-content-center">
|
||||
<div className={`${style['productToGain']}`}>
|
||||
<Image
|
||||
src={rotatingRightImage}
|
||||
alt="coffret de thé marron rempli de sachets de toutes couleurs"
|
||||
fill
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-12">
|
||||
<div className='btn btn-primary my-2'>
|
||||
<Link href="shop">Et bien d'autres !</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</header >
|
||||
|
||||
{/* <Section backgroundImagePath={'/images/three-cups-of-tea-steeping.png'}>
|
||||
<h2>Présentation du jeu concours</h2>
|
||||
<h4 className="fw-light">
|
||||
Gagnez de superbes cadeaux en achetant nos produits !
|
||||
<br />
|
||||
Pour participer, il vous suffit d'effectuer un achat en boutique d'une valeur supérieure à XXX euros. Retrouvez votre code sur la facture !
|
||||
<br />
|
||||
Saisissez votre code ... Félicitations ! Vous avez gagné un cadeau ! Il nous vous reste plus qu'à le récupérer en magasin.
|
||||
<br />
|
||||
Après la [XXX période], vous participerez au jeu concours final afin de gagner XXX. Un participation par personne est comptabilisée pour le concours final.
|
||||
</h4>
|
||||
</Section>
|
||||
<Section backgroundImagePath={'/images/top-view-of-a-tea-towel-and-container-holding-grain.png'}>
|
||||
<h2>Présentation de Thé Tip Top</h2>
|
||||
<h4 className="fw-light">
|
||||
Thé Tip Top est une entreprise de thé [XXX ajouter des spécifications en se basant sur le cahier des charges]
|
||||
</h4>
|
||||
</Section> */}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default MainPage;
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 662 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 33 KiB |
@@ -0,0 +1,252 @@
|
||||
.masthead {
|
||||
--aButton-base-padding: 0px;
|
||||
--aButton-grow-padding: 5px;
|
||||
}
|
||||
|
||||
.masthead {
|
||||
background-image: url('/images/pageprincipale.png');
|
||||
background-size: cover;
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: 5vh;
|
||||
height: 90vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.footerGrass {
|
||||
position: absolute;
|
||||
background-image: url('/image/footer_image.png');
|
||||
background-repeat: repeat-x;
|
||||
background-size: contain;
|
||||
width: 100vw;
|
||||
/* animation: moveLeftRight 2s infinite; */
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
}
|
||||
|
||||
@keyframes moveLeftRight {
|
||||
|
||||
|
||||
0%,
|
||||
100% {
|
||||
left: 10%;
|
||||
}
|
||||
|
||||
50% {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bloc-content {
|
||||
padding: 10vh;
|
||||
border-radius: 10px;
|
||||
background-image: url('/images/codebackground.png');
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
animation: zoomInOut 3s ease-in-out infinite;
|
||||
z-index: 8888
|
||||
}
|
||||
|
||||
.zoomInOutCadeau {
|
||||
animation: zoomInOut 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.zoomInOutJeuConcours {
|
||||
animation: zoomInOut 1.1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
|
||||
.rotatingImage {
|
||||
animation: 1s ease-in-out infinite alternate rotation;
|
||||
}
|
||||
|
||||
.rotatingSlow {
|
||||
animation: 4s ease-in-out infinite alternate rotation;
|
||||
}
|
||||
|
||||
.blinking {
|
||||
animation: blinking 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes zoomInOut {
|
||||
0% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.05, 1.05);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@keyframes rotation {
|
||||
0% {
|
||||
transform: rotate(2deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: rotate(-2deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(2deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blinking {
|
||||
|
||||
0%,
|
||||
50%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25%,
|
||||
75% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.zoom-in-out-box {
|
||||
animation: zoom-in-zoom-out 1s ease infinite;
|
||||
}
|
||||
|
||||
.imageWrapper {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.masthead .aButton {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.masthead .aButton:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
||||
/* border:1px solid black; */
|
||||
border-radius: 0.375rem;
|
||||
display: none;
|
||||
|
||||
left: var(--aButton-base-padding);
|
||||
top: var(--aButton-base-padding);
|
||||
width: calc(100% + var(--aButton-base-padding));
|
||||
height: calc(100% + var(--aButton-base-padding));
|
||||
}
|
||||
|
||||
.masthead .aButton:hover:after {
|
||||
display: block;
|
||||
animation: 0.7s linear infinite alternate expand;
|
||||
}
|
||||
|
||||
@keyframes expand {
|
||||
to {
|
||||
left: calc(var(--aButton-base-padding) - var(--aButton-grow-padding));
|
||||
top: calc(var(--aButton-base-padding) - var(--aButton-grow-padding));
|
||||
width: calc(100% + var(--aButton-base-padding) + 2 * var(--aButton-grow-padding));
|
||||
height: calc(100% + var(--aButton-base-padding) + 2 * var(--aButton-grow-padding));
|
||||
border: 3px solid var(--color3);
|
||||
}
|
||||
}
|
||||
|
||||
.productToGain {
|
||||
background-color: var(--color1);
|
||||
width: 20vw;
|
||||
height: 20vw;
|
||||
border-radius: 50%;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.productToGain {
|
||||
width: 13vw;
|
||||
height: 13vw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*mobile*/
|
||||
@media only screen and (max-width: 767px) {
|
||||
.feuilleGauche {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 9999;
|
||||
width: 25vw;
|
||||
}
|
||||
|
||||
.feuilleDroite {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
z-index: 9999;
|
||||
width: 25vw;
|
||||
}
|
||||
|
||||
.cadeau {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.jeuConcours {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.footerGrass {
|
||||
position: absolute;
|
||||
background-image: url('/image/footer_image.png');
|
||||
background-size: contain;
|
||||
width: 100vw;
|
||||
bottom: -10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*grand écran*/
|
||||
@media only screen and (min-width: 767px) {
|
||||
.feuilleGauche {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
z-index: 9999;
|
||||
width: 25vw;
|
||||
}
|
||||
|
||||
.feuilleDroite {
|
||||
position: absolute;
|
||||
bottom: 15px;
|
||||
right: 15px;
|
||||
z-index: 9999;
|
||||
width: 25vw;
|
||||
}
|
||||
|
||||
.cadeau {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.jeuConcours {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
z-index: 9999;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
.footer {
|
||||
background-color: #006600e6;
|
||||
color: white !important;
|
||||
padding-top: 20px;
|
||||
}
|
||||
+9
-127
@@ -1,20 +1,3 @@
|
||||
.masthead {
|
||||
--aButton-base-padding: 0px;
|
||||
--aButton-grow-padding: 5px;
|
||||
}
|
||||
|
||||
.masthead {
|
||||
background-image: url('/images/pageprincipale.png');
|
||||
background-size: cover;
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: 5vh;
|
||||
height: 90vh;
|
||||
position: relative;
|
||||
/* margin-bottom: 10vh;
|
||||
box-shadow: 0px 18px 16px 0px rgba(0, 0, 0, 0.87); */
|
||||
}
|
||||
|
||||
.bloc-content {
|
||||
padding: 10vh;
|
||||
border-radius: 10px;
|
||||
@@ -23,6 +6,15 @@
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
animation: zoomInOut 4s ease-in-out infinite;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.zoomInOutCadeau {
|
||||
animation: zoomInOut 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.zoomInOutJeuConcours {
|
||||
animation: zoomInOut 1.1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +26,6 @@
|
||||
animation: 4s ease-in-out infinite alternate rotation;
|
||||
}
|
||||
|
||||
.blinking {
|
||||
animation: blinking 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes zoomInOut {
|
||||
0% {
|
||||
transform: scale(1, 1);
|
||||
@@ -89,109 +77,3 @@
|
||||
.imageWrapper {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.masthead .aButton {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.masthead .aButton:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
||||
/* border:1px solid black; */
|
||||
border-radius: 0.375rem;
|
||||
display: none;
|
||||
|
||||
left: var(--aButton-base-padding);
|
||||
top: var(--aButton-base-padding);
|
||||
width: calc(100% + var(--aButton-base-padding));
|
||||
height: calc(100% + var(--aButton-base-padding));
|
||||
}
|
||||
|
||||
.masthead .aButton:hover:after {
|
||||
display: block;
|
||||
animation: 0.7s linear infinite alternate expand;
|
||||
}
|
||||
|
||||
@keyframes expand {
|
||||
to {
|
||||
left: calc(var(--aButton-base-padding) - var(--aButton-grow-padding));
|
||||
top: calc(var(--aButton-base-padding) - var(--aButton-grow-padding));
|
||||
width: calc(100% + var(--aButton-base-padding) + 2 * var(--aButton-grow-padding));
|
||||
height: calc(100% + var(--aButton-base-padding) + 2 * var(--aButton-grow-padding));
|
||||
border: 3px solid var(--color3);
|
||||
}
|
||||
}
|
||||
|
||||
.productToGain {
|
||||
background-color: var(--color1);
|
||||
width: 20vw;
|
||||
height: 20vw;
|
||||
border-radius: 50%;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.productToGain {
|
||||
width: 13vw;
|
||||
height: 13vw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*mobile*/
|
||||
@media only screen and (max-width: 767px) {
|
||||
.feuilleGauche {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
|
||||
}
|
||||
|
||||
.feuilleDroite {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 1px;
|
||||
}
|
||||
|
||||
.cadeau {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.jeuConcours {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
/*grand écran*/
|
||||
@media only screen and (min-width: 767px) {
|
||||
.feuilleGauche {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
.feuilleDroite {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 1px;
|
||||
}
|
||||
|
||||
.cadeau {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.jeuConcours {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
.customcss {
|
||||
background-color: transparent !important;
|
||||
z-index: 2000;
|
||||
z-index: 9999;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
+9
-12
@@ -1,12 +1,14 @@
|
||||
html,
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
a, a:hover {
|
||||
a,
|
||||
a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -15,16 +17,11 @@ a, a:hover {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root{
|
||||
--color1 : #C0D8F0;
|
||||
--color2 : #76AE0D;
|
||||
--color3 : #4C6D0C;
|
||||
--color4 : #F0F0F0;
|
||||
}
|
||||
|
||||
img{
|
||||
/* min-width: 0%!important;
|
||||
min-height: 0%!important; */
|
||||
:root {
|
||||
--color1: #C0D8F0;
|
||||
--color2: #76AE0D;
|
||||
--color3: #4C6D0C;
|
||||
--color4: #F0F0F0;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@@ -34,7 +31,7 @@ img{
|
||||
--bs-btn-hover-color: #fff;
|
||||
--bs-btn-hover-bg: var(--color3);
|
||||
--bs-btn-hover-border-color: var(--color3);
|
||||
--bs-btn-focus-shadow-rgb: 49,132,253;
|
||||
--bs-btn-focus-shadow-rgb: 49, 132, 253;
|
||||
--bs-btn-active-color: #fff;
|
||||
--bs-btn-active-bg: var(--color3);
|
||||
--bs-btn-active-border-color: var(--color3);
|
||||
|
||||
Reference in new issue
Block a user