File size: 1,460 Bytes
adbd025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomHeader extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        nav {
          backdrop-filter: blur(10px);
          -webkit-backdrop-filter: blur(10px);
        }
        .nav-link:hover {
          text-shadow: 0 0 8px currentColor;
        }
      </style>
      <header class="fixed top-0 left-0 right-0 z-50">
        <nav class="bg-gray-900 bg-opacity-80 border-b border-gray-800">
          <div class="container mx-auto px-4 py-4 flex justify-between items-center">
            <a href="#" class="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-purple-400 to-pink-500">
              Void Explorer
            </a>
            <div class="hidden md:flex space-x-8">
              <a href="#" class="nav-link text-gray-300 hover:text-white transition-colors">Home</a>
              <a href="#" class="nav-link text-gray-300 hover:text-white transition-colors">About</a>
              <a href="#" class="nav-link text-gray-300 hover:text-white transition-colors">Explore</a>
              <a href="#" class="nav-link text-gray-300 hover:text-white transition-colors">Contact</a>
            </div>
            <button class="md:hidden">
              <i data-feather="menu" class="w-6 h-6"></i>
            </button>
          </div>
        </nav>
      </header>
    `;
  }
}
customElements.define('custom-header', CustomHeader);