this part lacks design it needs the be consistent with the design of the website
Browse files- components/navbar.js +38 -32
components/navbar.js
CHANGED
|
@@ -12,72 +12,78 @@ class CustomNavbar extends HTMLElement {
|
|
| 12 |
}
|
| 13 |
.nav-link {
|
| 14 |
position: relative;
|
| 15 |
-
transition:
|
|
|
|
| 16 |
}
|
| 17 |
.nav-link:hover {
|
| 18 |
-
color: #
|
| 19 |
}
|
| 20 |
.nav-link::after {
|
| 21 |
content: '';
|
| 22 |
position: absolute;
|
| 23 |
-
bottom:
|
| 24 |
left: 0;
|
| 25 |
width: 0;
|
| 26 |
height: 2px;
|
| 27 |
-
background-color: #
|
| 28 |
transition: width 0.3s ease;
|
| 29 |
}
|
| 30 |
.nav-link:hover::after {
|
| 31 |
width: 100%;
|
| 32 |
}
|
| 33 |
.active-link {
|
| 34 |
-
color: #
|
| 35 |
font-weight: 500;
|
| 36 |
}
|
| 37 |
.active-link::after {
|
| 38 |
width: 100%;
|
|
|
|
| 39 |
}
|
| 40 |
-
|
| 41 |
max-height: 0;
|
| 42 |
overflow: hidden;
|
| 43 |
-
transition: max-height 0.3s ease-out;
|
| 44 |
}
|
| 45 |
.mobile-menu.open {
|
| 46 |
max-height: 500px;
|
|
|
|
| 47 |
}
|
| 48 |
-
|
| 49 |
<nav class="navbar fixed w-full z-50 bg-primary text-white">
|
| 50 |
<div class="container mx-auto px-6 py-4">
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
</div>
|
| 64 |
-
|
| 65 |
-
<!-- Mobile menu button -->
|
| 66 |
-
<button class="md:hidden focus:outline-none" id="mobile-menu-button">
|
| 67 |
-
<i data-feather="menu" class="w-6 h-6"></i>
|
| 68 |
-
</button>
|
| 69 |
-
</div>
|
| 70 |
-
|
| 71 |
<!-- Mobile Navigation -->
|
| 72 |
<div class="mobile-menu md:hidden" id="mobile-menu">
|
| 73 |
<div class="px-2 pt-2 pb-4 space-y-2">
|
| 74 |
-
<a href="index.html" class="block px-3 py-
|
| 75 |
-
<a href="features.html" class="block px-3 py-
|
| 76 |
-
<a href="about.html" class="block px-3 py-
|
| 77 |
-
<a href="#" class="block w-full text-center bg-white text-primary px-4 py-
|
|
|
|
|
|
|
| 78 |
</div>
|
| 79 |
</div>
|
| 80 |
-
|
| 81 |
</nav>
|
| 82 |
`;
|
| 83 |
|
|
|
|
| 12 |
}
|
| 13 |
.nav-link {
|
| 14 |
position: relative;
|
| 15 |
+
transition: all 0.3s ease;
|
| 16 |
+
padding: 0.5rem 0;
|
| 17 |
}
|
| 18 |
.nav-link:hover {
|
| 19 |
+
color: #81c784;
|
| 20 |
}
|
| 21 |
.nav-link::after {
|
| 22 |
content: '';
|
| 23 |
position: absolute;
|
| 24 |
+
bottom: 0;
|
| 25 |
left: 0;
|
| 26 |
width: 0;
|
| 27 |
height: 2px;
|
| 28 |
+
background-color: #81c784;
|
| 29 |
transition: width 0.3s ease;
|
| 30 |
}
|
| 31 |
.nav-link:hover::after {
|
| 32 |
width: 100%;
|
| 33 |
}
|
| 34 |
.active-link {
|
| 35 |
+
color: #81c784;
|
| 36 |
font-weight: 500;
|
| 37 |
}
|
| 38 |
.active-link::after {
|
| 39 |
width: 100%;
|
| 40 |
+
background-color: #81c784;
|
| 41 |
}
|
| 42 |
+
.mobile-menu {
|
| 43 |
max-height: 0;
|
| 44 |
overflow: hidden;
|
| 45 |
+
transition: max-height 0.3s ease-out, padding 0.3s ease;
|
| 46 |
}
|
| 47 |
.mobile-menu.open {
|
| 48 |
max-height: 500px;
|
| 49 |
+
padding-bottom: 1rem;
|
| 50 |
}
|
| 51 |
+
</style>
|
| 52 |
<nav class="navbar fixed w-full z-50 bg-primary text-white">
|
| 53 |
<div class="container mx-auto px-6 py-4">
|
| 54 |
+
<div class="flex justify-between items-center">
|
| 55 |
+
<a href="index.html" class="text-2xl font-bold flex items-center text-white hover:text-secondary transition-colors duration-300">
|
| 56 |
+
<i data-feather="shopping-bag" class="mr-2 w-6 h-6"></i>
|
| 57 |
+
WasteLess
|
| 58 |
+
</a>
|
| 59 |
+
|
| 60 |
+
<!-- Desktop Navigation -->
|
| 61 |
+
<div class="hidden md:flex items-center space-x-8">
|
| 62 |
+
<a href="index.html" class="nav-link text-white hover:text-secondary transition-colors duration-300">Home</a>
|
| 63 |
+
<a href="features.html" class="nav-link text-white hover:text-secondary transition-colors duration-300">Features</a>
|
| 64 |
+
<a href="about.html" class="nav-link text-white hover:text-secondary transition-colors duration-300">About</a>
|
| 65 |
+
<a href="#" class="bg-white text-primary px-6 py-2 rounded-full font-medium hover:bg-gray-100 transition-all duration-300 shadow-md hover:shadow-lg">
|
| 66 |
+
Get App
|
| 67 |
+
</a>
|
| 68 |
+
</div>
|
| 69 |
+
|
| 70 |
+
<!-- Mobile menu button -->
|
| 71 |
+
<button class="md:hidden focus:outline-none p-2 rounded-full hover:bg-white/20 transition-colors duration-300" id="mobile-menu-button">
|
| 72 |
+
<i data-feather="menu" class="w-6 h-6 text-white"></i>
|
| 73 |
+
</button>
|
| 74 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
<!-- Mobile Navigation -->
|
| 76 |
<div class="mobile-menu md:hidden" id="mobile-menu">
|
| 77 |
<div class="px-2 pt-2 pb-4 space-y-2">
|
| 78 |
+
<a href="index.html" class="block px-3 py-3 rounded-lg text-base font-medium text-white hover:bg-white/20 transition-colors duration-300">Home</a>
|
| 79 |
+
<a href="features.html" class="block px-3 py-3 rounded-lg text-base font-medium text-white hover:bg-white/20 transition-colors duration-300">Features</a>
|
| 80 |
+
<a href="about.html" class="block px-3 py-3 rounded-lg text-base font-medium text-white hover:bg-white/20 transition-colors duration-300">About</a>
|
| 81 |
+
<a href="#" class="block w-full text-center bg-white text-primary px-4 py-3 rounded-full font-medium mt-2 hover:bg-gray-100 transition-all duration-300 shadow-md">
|
| 82 |
+
Get App
|
| 83 |
+
</a>
|
| 84 |
</div>
|
| 85 |
</div>
|
| 86 |
+
</div>
|
| 87 |
</nav>
|
| 88 |
`;
|
| 89 |
|