Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Commit

Permalink
style: fix weird glitch in mobile navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
ulissesferreira committed Apr 16, 2019
1 parent f7091b8 commit b50408a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ header p {
border-radius: 2rem;
}

.height-to-fix {
padding-top: 5rem;
}

/* * * * * * * * *
* MEDIA QUERIES
* * * * * * * * */
Expand Down
5 changes: 4 additions & 1 deletion src/components/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function hamburgerClick() {
let navbar = document.querySelector('nav'),
hamburger = document.querySelector('.hamburger-container'),
calltoaction = document.querySelector('#calltoaction');
calltoaction = document.querySelector('#calltoaction'),
header = document.querySelector('header')

if(hamburger.classList.contains('open')) {
// close hamburger
Expand All @@ -15,9 +16,11 @@ function hamburgerClick() {
setTimeout(() => {
navbar.classList.remove('menu-open')
navbar.classList.remove('menu-close')
header.classList.remove('height-to-fix')
}, 250);
}
else {
header.classList.add('height-to-fix')
// open hamburger
hamburger.classList.add('open')
// start menu open animation
Expand Down

0 comments on commit b50408a

Please sign in to comment.