🚸 add - grosse refonte du site
This commit is contained in:
1 parent
dfa67f86d5
commit
9e959f5ac6
50 files changed
+973
-289
No files matched your search
@@ -0,0 +1,76 @@
|
||||
import React, { useRef } from "react";
|
||||
import logo from '../public/images/thetiptop_logo.png';
|
||||
import Link from "next/link";
|
||||
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 navRef = useRef<HTMLInputElement>();
|
||||
|
||||
const router = useRouter();
|
||||
const { data: session, status } = useSession();
|
||||
|
||||
const closeNav = () => {
|
||||
navRef.current.style.height = "0%";
|
||||
}
|
||||
|
||||
const openNav = () => {
|
||||
navRef.current.style.height = "100%";
|
||||
}
|
||||
|
||||
let visitor = (
|
||||
<nav className={`${style.customcss} container-fluid`}>
|
||||
|
||||
<div className="d-flex justify-content-center">
|
||||
<Image
|
||||
src={logo}
|
||||
|
||||
alt="thetiptop navigation logo big"
|
||||
width={250}
|
||||
height={100}
|
||||
/>
|
||||
</div>
|
||||
<div className={`justify-content-center text-center ${style['hidden-mobile']}`}>
|
||||
<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 className={`justify-content-center text-center ${style['show-mobile']}`}>
|
||||
<span className={`${style.burgerButton}`} onClick={openNav}>☰</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div ref={navRef} className={style.overlay} onClick={closeNav}>
|
||||
|
||||
<a href="javascript:void(0)" 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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
)
|
||||
|
||||
return (<>
|
||||
{visitor}
|
||||
</>)
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
export default NavBar;
|
||||
Reference in new issue
Block a user