Skip to content

Commit

Permalink
Merge pull request #21 from Sayan67/main
Browse files Browse the repository at this point in the history
Fixed Hero section Image and added no-scroll to body while Hamburger is opened.
  • Loading branch information
Sayan67 authored Mar 16, 2024
2 parents 99c0b8e + 13f06a4 commit 359d373
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion client/component/Navbar/MobileNavbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ const MobileNavbar = () => {
const [shouldMorph, setMorph] = useState(false);

const handleToggle = () => {
document.body.style.overflow = isOpen ? 'auto' : 'hidden';
setIsOpen(!isOpen);
};

useEffect(() => {

const trigger = document.createElement('div')
trigger.style.position = 'absolute';
trigger.style.top = '0';
Expand All @@ -39,6 +39,7 @@ const MobileNavbar = () => {
useEffect(() => {
// Hide the mobile navbar when the url changes.
setIsOpen(false)
document.body.style.overflow = 'scroll'
}, [urlPathname])

return (
Expand Down
7 changes: 5 additions & 2 deletions client/styles/Navbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@
z-index: 9999999999;
position: fixed;
top: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}

.Hamburger_icon {
Expand Down Expand Up @@ -204,8 +207,8 @@
}

.BlurBackground {
width: 100vw;
height: 100vh;
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
top: 0;
Expand Down
7 changes: 6 additions & 1 deletion client/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

@import url('https://fonts.googleapis.com/css2?family=Victor+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

img,video{
max-width: inherit;
height: inherit;
}

* {
box-sizing: border-box;
margin: 0;
Expand Down Expand Up @@ -51,7 +56,7 @@ a {
body {
background-color: var(--backGround);
font-family: 'quaz';
/* overflow: hidden; */
overflow: scroll;
}

.register_text {
Expand Down

0 comments on commit 359d373

Please sign in to comment.