-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67c6afc
commit e108cfe
Showing
4 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@media screen and (max-width: 1200px) { | ||
#desktop-nav { | ||
display: none; | ||
} | ||
|
||
#hamburger-nav { | ||
display: flex; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function toggleMenu(){ | ||
const menu = document.querySelector(".menu-links"); | ||
const icon = document.querySelector(".hamburger-icon"); | ||
menu.classList.toggle("open"); | ||
icon.classList.toggle("open"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
/* General */ | ||
|
||
|
||
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap'); | ||
|
||
|
||
*{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body { | ||
font-family: 'Poppins', sans-serif; | ||
} | ||
|
||
html{ | ||
scroll-behavior: smooth; | ||
} | ||
|
||
p{ | ||
color: rgb(85, 85, 85); | ||
} | ||
|
||
/* Transition */ | ||
|
||
a, | ||
.btn{ | ||
transition: all 300ms ease; | ||
} | ||
|
||
/* Desktop Nav */ | ||
|
||
nav, | ||
.nav-links{ | ||
display: flex; | ||
} | ||
|
||
nav { | ||
justify-content: space-around; | ||
align-items: center; | ||
height: 17vh; | ||
} | ||
|
||
.nav-links{ | ||
gap: 2rem; | ||
list-style: none; | ||
font-size: 1.5rem; | ||
} | ||
|
||
a{ | ||
color: black; | ||
text-decoration: none; | ||
text-decoration-color: white; | ||
} | ||
|
||
a:hover{ | ||
color: grey; | ||
text-decoration: underline; | ||
text-underline-offset: 1rem; | ||
text-decoration-color: rgb(181, 181, 181); | ||
} | ||
|
||
.logo{ | ||
font-size: 2rem; | ||
} | ||
|
||
.logo:hover{ | ||
cursor: default; | ||
} | ||
|
||
/* Hamburger Menu */ | ||
|
||
#hamburger-nav { | ||
display: none; | ||
} | ||
|
||
.hamburger-menu{ | ||
position: relative; | ||
display: inline-block; | ||
} | ||
|
||
.hamburger-icon{ | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
height: 24px; | ||
width: 30px; | ||
cursor: pointer; | ||
} | ||
|
||
.hamburger-icon span{ | ||
width: 100%; | ||
height: 2px; | ||
background-color: black; | ||
transition: all 0.3 ease-in-out; | ||
} | ||
|
||
.menu-links{ | ||
position: absolute; | ||
top: 100%; | ||
right: 0; | ||
background-color: white; | ||
width: fit-content; | ||
max-height: 0; | ||
overflow: hidden; | ||
transition: all 0.3 ease-in-out; | ||
} | ||
|
||
.menu-links a{ | ||
display: block; | ||
padding: 10px; | ||
text-align: center; | ||
font-size: 1.5rem; | ||
color: black; | ||
text-decoration: none; | ||
transition: all 0.3 ease-in-out; | ||
} | ||
|
||
.menu-links li{ | ||
list-style: none; | ||
} | ||
|
||
.menu-links.open{ | ||
max-height: 300px; | ||
} | ||
|
||
.hamburger-icon.open span:first-child{ | ||
transform: rotate(45deg) translate(10px,5px); | ||
} | ||
|
||
.hamburger-icon.open span:nth-child(2){ | ||
opacity: 0; | ||
} | ||
|
||
.hamburger-icon.open span:last-child{ | ||
transform: rotate(-45deg) translate(10px,-5px); | ||
} | ||
|
||
.hamburger-icon span:first-child{ | ||
transform: none; | ||
} | ||
|
||
.hamburger-icon span:first-child{ | ||
opacity: 1; | ||
} | ||
|
||
.hamburger-icon span:first-child{ | ||
transform: none; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|