💄 add - amélioration de la page principale et du component Content
This commit is contained in:
1 parent
9e959f5ac6
commit
77db425b0e
17 files changed
+654
-234
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>
|
||||
|
||||
|
||||
Reference in new issue
Block a user