aboutsummaryrefslogtreecommitdiff
path: root/src/styles/Navbar.css
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2024-01-20 00:31:03 -0500
committerAndrew Lee <alee14498@protonmail.com>2024-01-20 00:31:03 -0500
commit84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be (patch)
tree9bbefc8254a9a8681ba46a98b959e940b34364be /src/styles/Navbar.css
parent57965c763f38db0b7f48cae40169e52274a936cb (diff)
downloadpersonal-website-84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be.tar.gz
personal-website-84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be.tar.bz2
personal-website-84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be.zip
Navbar responsive design; Now using grid instead of flexbox
Diffstat (limited to 'src/styles/Navbar.css')
-rw-r--r--src/styles/Navbar.css72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/styles/Navbar.css b/src/styles/Navbar.css
index e17decd..9dbf797 100644
--- a/src/styles/Navbar.css
+++ b/src/styles/Navbar.css
@@ -25,3 +25,75 @@ a.nav-link:hover {
a.nav-link:active {
color: #609460;
}
+
+@media (max-width: 768px) {
+ ul.nav-list {
+ flex-direction: column;
+ align-items: center;
+ gap: 2vh;
+ }
+}
+
+.nav-toggle {
+ background: transparent;
+ border: none;
+ cursor: pointer;
+ display: none;
+}
+
+.nav-toggle .hamburger {
+ width: 30px;
+ height: 2px;
+ background: white;
+ display: block;
+ position: relative;
+}
+
+.nav-toggle .hamburger::before, .nav-toggle .hamburger::after {
+ content: '';
+ background: white;
+ display: block;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+.nav-toggle .hamburger::before {
+ top: -10px;
+}
+
+.nav-toggle .hamburger::after {
+ bottom: -10px;
+}
+
+@media (max-width: 768px) {
+ .nav-toggle {
+ display: block;
+ padding: 20px;
+ }
+
+
+ ul.nav-list {
+ flex-direction: column;
+ align-items: center;
+ gap: 2vh;
+ display: none;
+ }
+
+ ul.nav-list.show {
+ display: flex;
+ }
+
+ @keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+ }
+
+ .nav-list.show a.nav-link {
+ animation: fadeIn 0.5s ease-in-out forwards;
+ }
+}