From 86fd9d3a6d0a678dafb5f95cd6b2e52fcc3966e7 Mon Sep 17 00:00:00 2001 From: Lou Date: Fri, 27 Aug 2021 20:28:17 +0200 Subject: [PATCH] =?UTF-8?q?commit=20relout=20parce=20que=20l'=C3=A9cran=20?= =?UTF-8?q?est=20p=C3=A9t=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/header/index.scss | 11 ++++++++ src/components/navbar/index.jsx | 33 +++++++++++++++++++---- src/components/navbar/index.scss | 46 +++++++++++++++++++++++++------- src/images/menu.svg | 2 +- 4 files changed, 76 insertions(+), 16 deletions(-) diff --git a/src/components/header/index.scss b/src/components/header/index.scss index 2ef5e32..371f83d 100644 --- a/src/components/header/index.scss +++ b/src/components/header/index.scss @@ -54,3 +54,14 @@ header { } } } + +@media screen and (max-width: 800px) { + header { + margin-top: -8rem; + height: 102vh; + + .hero { + margin-top: 10rem; + } + } +} diff --git a/src/components/navbar/index.jsx b/src/components/navbar/index.jsx index cba2d32..cf13961 100644 --- a/src/components/navbar/index.jsx +++ b/src/components/navbar/index.jsx @@ -1,11 +1,13 @@ -import React, { useContext } from "react"; +import React, { useContext, useState, useEffect } from "react"; import { Link } from "gatsby"; import HeaderContext from "../../context/headerContext"; import "./index.scss"; +import MenuIcon from "../../images/menu.svg"; const Navbar = () => { const headerContext = useContext(HeaderContext); + const [toogleMenu, setToogleMenu] = useState(false); const handleShowNavbar = (context) => { if (context.isHeaderHidden === true) { @@ -15,20 +17,41 @@ const Navbar = () => { } }; + const handleMenu = () => { + setToogleMenu(!toogleMenu); + }; + + const menuStyle = { + background: "red"; + + } + return (