File size: 2,026 Bytes
0d130a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomHeader extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                nav {
                    font-family: 'Roboto Mono', monospace;
                }
                .nav-link:hover {
                    color: #00ff41;
                    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
                }
                .active {
                    color: #00ff41;
                    border-bottom: 2px solid #00ff41;
                }
            </style>
            <header class="bg-dark-800 border-b border-dark-700">
                <div class="container mx-auto px-4">
                    <nav class="flex items-center justify-between py-4">
                        <a href="/" class="flex items-center space-x-2">
                            <i data-feather="globe" class="w-6 h-6 text-neon-green"></i>
                            <span class="text-xl font-bold neon-text hover-flicker">DarkNetExplorer</span>
                        </a>
                        <div class="hidden md:flex items-center space-x-8">
                            <a href="/" class="nav-link active">Home</a>
                            <a href="/browser" class="nav-link">Browser</a>
                            <a href="/resources" class="nav-link">Resources</a>
                            <a href="/about" class="nav-link">About</a>
                            <button id="dark-mode-toggle" class="p-2 rounded-full hover:bg-dark-700">
                                <i data-feather="moon" class="w-5 h-5"></i>
                            </button>
                        </div>
                        <button class="md:hidden p-2 rounded-full hover:bg-dark-700">
                            <i data-feather="menu" class="w-5 h-5"></i>
                        </button>
                    </nav>
                </div>
            </header>
        `;
    }
}
customElements.define('custom-header', CustomHeader);