File size: 1,337 Bytes
67e3fbc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomNavbar extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        .navbar {
          background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
          box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }
        .nav-link:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }
      </style>
      <nav class="navbar text-white py-4 px-6">
        <div class="container mx-auto flex justify-between items-center">
          <div class="flex items-center space-x-2">
            <i data-feather="zap" class="text-yellow-300"></i>
            <span class="text-xl font-bold">Mystic Connector</span>
          </div>
          <div class="hidden md:flex space-x-1">
            <a href="#" class="nav-link px-4 py-2 rounded-lg transition">Home</a>
            <a href="#" class="nav-link px-4 py-2 rounded-lg transition">Documentation</a>
            <a href="#" class="nav-link px-4 py-2 rounded-lg transition">Settings</a>
            <a href="#" class="nav-link px-4 py-2 rounded-lg transition">About</a>
          </div>
          <button class="md:hidden">
            <i data-feather="menu"></i>
          </button>
        </div>
      </nav>
    `;
  }
}
customElements.define('custom-navbar', CustomNavbar);