Ghostgim commited on
Commit
c8d027c
·
verified ·
1 Parent(s): 36f931e

Design a sleek, modern, and professional website navigation menu featuring the following links: Home, Services, Process, About. The menu should be visually appealing, easy to navigate, with a clean layout, subtle hover effects, and a polished appearance. Remove any other menu items and ensure the overall design exudes high quality and user-friendliness.

Browse files
Files changed (1) hide show
  1. components/navbar.js +66 -54
components/navbar.js CHANGED
@@ -15,83 +15,95 @@ class CustomNavbar extends HTMLElement {
15
  background-color: transparent;
16
  backdrop-filter: none;
17
  }
18
- .nav-link {
19
  position: relative;
 
 
 
 
 
20
  }
21
- .nav-link::after {
22
- content: '';
23
- position: absolute;
24
- width: 0;
25
- height: 2px;
26
- bottom: -2px;
27
- left: 0;
28
- background-color: currentColor;
29
- transition: width 0.3s ease;
30
  }
31
- .nav-link:hover::after {
32
- width: 100%;
 
 
 
33
  }
34
  .mobile-menu {
35
  max-height: 0;
36
  overflow: hidden;
37
  transition: max-height 0.3s ease-out;
38
- background: rgba(15, 23, 42, 0.95);
39
- backdrop-filter: blur(10px);
40
- border-radius: 0.5rem;
41
- margin-top: 0.5rem;
 
42
  }
43
  .mobile-menu.open {
44
- max-height: 500px;
 
45
  }
46
- .dropdown-menu {
47
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
48
  }
49
  </style>
50
  <nav class="navbar fixed w-full z-50 px-6 py-4 transition-colors duration-300">
51
  <div class="max-w-7xl mx-auto flex justify-between items-center">
52
  <a href="/" class="text-xl font-bold text-white bg-clip-text text-transparent bg-gradient-to-r from-primary-100 to-secondary-500">Complex Devs</a>
53
- <div class="hidden md:flex items-center space-x-8">
54
- <a href="/" class="nav-link text-white hover:text-primary-100 transition-colors px-3 py-2 rounded-md text-sm font-medium">Home</a>
55
- <a href="#services" class="nav-link text-white hover:text-primary-100 transition-colors px-3 py-2 rounded-md text-sm font-medium">Services</a>
56
- <a href="#process" class="nav-link text-white hover:text-primary-100 transition-colors px-3 py-2 rounded-md text-sm font-medium">Process</a>
57
- <a href="#about" class="nav-link text-white hover:text-primary-100 transition-colors px-3 py-2 rounded-md text-sm font-medium">About</a>
58
- <a href="#contact" class="nav-link text-white hover:text-primary-100 transition-colors px-3 py-2 rounded-md text-sm font-medium">Contact</a>
59
- <div class="relative group">
60
- <button class="flex items-center space-x-1 text-white hover:text-primary-100 transition-colors px-3 py-2 rounded-md text-sm font-medium">
61
- <span>Menu</span>
62
- <i data-feather="chevron-down" class="w-4 h-4 transition-transform group-hover:rotate-180"></i>
63
- </button>
64
- <div class="absolute right-0 mt-2 w-48 origin-top-right bg-white rounded-md shadow-lg py-1 ring-1 ring-black ring-opacity-5 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 transform group-hover:translate-y-0 translate-y-1 z-50">
65
- <a href="/" class="block px-4 py-2 text-sm text-gray-700 hover:bg-primary-100 hover:text-primary-700">Home</a>
66
- <a href="#services" class="block px-4 py-2 text-sm text-gray-700 hover:bg-primary-100 hover:text-primary-700">Services</a>
67
- <a href="#process" class="block px-4 py-2 text-sm text-gray-700 hover:bg-primary-100 hover:text-primary-700">Process</a>
68
- <a href="#about" class="block px-4 py-2 text-sm text-gray-700 hover:bg-primary-100 hover:text-primary-700">About</a>
69
- <a href="#contact" class="block px-4 py-2 text-sm text-gray-700 hover:bg-primary-100 hover:text-primary-700">Contact</a>
70
- <div class="border-t border-gray-200 my-1"></div>
71
- <a href="mailto:developerscomplex@gmail.com" class="block px-4 py-2 text-sm text-gray-700 hover:bg-primary-100 hover:text-primary-700">Email Us</a>
72
- </div>
73
- </div>
74
- <a href="#contact" class="ml-4 bg-gradient-to-r from-primary-500 to-secondary-500 hover:from-primary-600 hover:to-secondary-600 text-white font-semibold py-2 px-6 rounded-lg transition-all duration-300 shadow-lg hover:shadow-xl transform hover:scale-105">
75
- Get Started
76
- </a>
77
  </div>
78
 
79
  <button id="mobile-menu-button" class="md:hidden text-gray-600 focus:outline-none">
80
  <i data-feather="menu"></i>
81
  </button>
82
  </div>
83
-
84
- <div id="mobile-menu" class="mobile-menu md:hidden bg-white rounded-lg mt-2 shadow-lg">
85
- <div class="px-4 py-2 space-y-4">
86
- <a href="/" class="block px-4 py-3 text-white hover:bg-gray-800 rounded-lg transition-colors">Home</a>
87
- <a href="#services" class="block px-4 py-3 text-white hover:bg-gray-800 rounded-lg transition-colors">Services</a>
88
- <a href="#process" class="block px-4 py-3 text-white hover:bg-gray-800 rounded-lg transition-colors">Process</a>
89
- <a href="#about" class="block px-4 py-3 text-white hover:bg-gray-800 rounded-lg transition-colors">About</a>
90
- <a href="#contact" class="block px-4 py-3 text-white hover:bg-gray-800 rounded-lg transition-colors">Contact</a>
91
- <a href="#contact" class="block px-4 py-3 bg-gradient-to-r from-primary-500 to-secondary-500 text-white font-semibold text-center rounded-lg hover:from-primary-600 hover:to-secondary-600 mt-2 transition-all">
92
- Get Started
93
- </a>
94
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  </div>
96
  </nav>
97
 
 
15
  background-color: transparent;
16
  backdrop-filter: none;
17
  }
18
+ .nav-link {
19
  position: relative;
20
+ overflow: hidden;
21
+ }
22
+ .nav-link span:last-child {
23
+ transform-origin: left;
24
+ transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
25
  }
26
+ .nav-link:hover span:last-child {
27
+ transform: scaleX(1);
 
 
 
 
 
 
 
28
  }
29
+ .nav-link.active {
30
+ color: white;
31
+ }
32
+ .nav-link.active span:last-child {
33
+ transform: scaleX(1);
34
  }
35
  .mobile-menu {
36
  max-height: 0;
37
  overflow: hidden;
38
  transition: max-height 0.3s ease-out;
39
+ background: rgba(15, 23, 42, 0.98);
40
+ backdrop-filter: blur(20px);
41
+ border: 1px solid rgba(255, 255, 255, 0.08);
42
+ border-radius: 0.75rem;
43
+ margin-top: 0.75rem;
44
  }
45
  .mobile-menu.open {
46
+ max-height: 400px;
47
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
48
  }
49
+ .dropdown-menu {
50
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
51
  }
52
  </style>
53
  <nav class="navbar fixed w-full z-50 px-6 py-4 transition-colors duration-300">
54
  <div class="max-w-7xl mx-auto flex justify-between items-center">
55
  <a href="/" class="text-xl font-bold text-white bg-clip-text text-transparent bg-gradient-to-r from-primary-100 to-secondary-500">Complex Devs</a>
56
+ <div class="hidden md:flex items-center space-x-6">
57
+ <a href="/" class="nav-link relative text-gray-300 hover:text-white px-3 py-2 text-sm font-medium transition-all duration-300">
58
+ <span class="relative z-10">Home</span>
59
+ <span class="absolute inset-x-1 bottom-0 h-0.5 bg-gradient-to-r from-primary-500 to-secondary-500 scale-x-0 origin-left transition-transform duration-300 nav-link:hover:scale-x-100"></span>
60
+ </a>
61
+ <a href="#services" class="nav-link relative text-gray-300 hover:text-white px-3 py-2 text-sm font-medium transition-all duration-300">
62
+ <span class="relative z-10">Services</span>
63
+ <span class="absolute inset-x-1 bottom-0 h-0.5 bg-gradient-to-r from-primary-500 to-secondary-500 scale-x-0 origin-left transition-transform duration-300 nav-link:hover:scale-x-100"></span>
64
+ </a>
65
+ <a href="#process" class="nav-link relative text-gray-300 hover:text-white px-3 py-2 text-sm font-medium transition-all duration-300">
66
+ <span class="relative z-10">Process</span>
67
+ <span class="absolute inset-x-1 bottom-0 h-0.5 bg-gradient-to-r from-primary-500 to-secondary-500 scale-x-0 origin-left transition-transform duration-300 nav-link:hover:scale-x-100"></span>
68
+ </a>
69
+ <a href="#about" class="nav-link relative text-gray-300 hover:text-white px-3 py-2 text-sm font-medium transition-all duration-300">
70
+ <span class="relative z-10">About</span>
71
+ <span class="absolute inset-x-1 bottom-0 h-0.5 bg-gradient-to-r from-primary-500 to-secondary-500 scale-x-0 origin-left transition-transform duration-300 nav-link:hover:scale-x-100"></span>
72
+ </a>
 
 
 
 
 
 
 
73
  </div>
74
 
75
  <button id="mobile-menu-button" class="md:hidden text-gray-600 focus:outline-none">
76
  <i data-feather="menu"></i>
77
  </button>
78
  </div>
79
+ <div id="mobile-menu" class="mobile-menu md:hidden bg-gray-900 rounded-lg mt-2 shadow-xl">
80
+ <div class="px-4 py-2 space-y-2">
81
+ <a href="/" class="block px-4 py-3 text-gray-300 hover:text-white hover:bg-gray-800 rounded-lg transition-all duration-300">
82
+ <div class="flex items-center space-x-3">
83
+ <i data-feather="home" class="w-5 h-5"></i>
84
+ <span>Home</span>
85
+ </div>
86
+ </a>
87
+ <a href="#services" class="block px-4 py-3 text-gray-300 hover:text-white hover:bg-gray-800 rounded-lg transition-all duration-300">
88
+ <div class="flex items-center space-x-3">
89
+ <i data-feather="layers" class="w-5 h-5"></i>
90
+ <span>Services</span>
91
+ </div>
92
+ </a>
93
+ <a href="#process" class="block px-4 py-3 text-gray-300 hover:text-white hover:bg-gray-800 rounded-lg transition-all duration-300">
94
+ <div class="flex items-center space-x-3">
95
+ <i data-feather="settings" class="w-5 h-5"></i>
96
+ <span>Process</span>
97
+ </div>
98
+ </a>
99
+ <a href="#about" class="block px-4 py-3 text-gray-300 hover:text-white hover:bg-gray-800 rounded-lg transition-all duration-300">
100
+ <div class="flex items-center space-x-3">
101
+ <i data-feather="user" class="w-5 h-5"></i>
102
+ <span>About</span>
103
+ </div>
104
+ </a>
105
+ </div>
106
+ </div>
107
  </div>
108
  </nav>
109