File size: 1,270 Bytes
ffe0e1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomHeader extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                nav {
                    font-family: 'IBM Plex Mono', monospace;
                }
                .nav-link:hover {
                    text-decoration: underline;
                    text-decoration-thickness: 3px;
                }
            </style>
            <header class="bg-brutal-black text-brutal-white py-6">
                <div class="container mx-auto px-4">
                    <nav class="flex justify-between items-center">
                        <a href="/" class="text-2xl font-bold">BRUTAL<span class="text-brutal-accent">.</span>BLOG</a>
                        <div class="flex space-x-6">
                            <a href="/" class="nav-link">HOME</a>
                            <a href="/about" class="nav-link">ABOUT</a>
                            <a href="/archive" class="nav-link">ARCHIVE</a>
                            <a href="/contact" class="nav-link">CONTACT</a>
                        </div>
                    </nav>
                </div>
            </header>
        `;
    }
}
customElements.define('custom-header', CustomHeader);