File size: 1,911 Bytes
94c5e6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class CustomNavbar extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        .navbar {
          transition: all 0.3s ease;
        }
        .nav-link {
          position: relative;
        }
        .nav-link:after {
          content: '';
          position: absolute;
          width: 0;
          height: 2px;
          bottom: -2px;
          left: 0;
          background-color: #f59e0b;
          transition: width 0.3s ease;
        }
        .nav-link:hover:after {
          width: 100%;
        }
      </style>
      <nav class="navbar bg-white shadow-sm py-4">
        <div class="container mx-auto px-4 flex justify-between items-center">
          <a href="/" class="flex items-center">
            <span class="text-2xl font-bold text-amber-500">LinkHive</span>
          </a>
          
          <div class="hidden md:flex space-x-8">
            <a href="/features" class="nav-link text-gray-700 hover:text-amber-500">Features</a>
            <a href="/pricing" class="nav-link text-gray-700 hover:text-amber-500">Pricing</a>
            <a href="/templates" class="nav-link text-gray-700 hover:text-amber-500">Templates</a>
            <a href="/blog" class="nav-link text-gray-700 hover:text-amber-500">Blog</a>
          </div>
          
          <div class="flex items-center space-x-4">
            <a href="/login" class="text-gray-700 hover:text-amber-500">Log In</a>
            <a href="/signup" class="bg-amber-500 hover:bg-amber-600 text-white px-4 py-2 rounded-full transition duration-300">
              Sign Up
            </a>
          </div>
          
          <button class="md:hidden focus:outline-none">
            <i data-feather="menu" class="text-gray-700"></i>
          </button>
        </div>
      </nav>
    `;
  }
}
customElements.define('custom-navbar', CustomNavbar);