File size: 917 Bytes
8b8dcfa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomHeader extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                header {
                    @apply border-b border-gray-800 bg-gray-900;
                }
                .header-content {
                    @apply container mx-auto px-4 py-6 text-center;
                }
                h1 {
                    @apply text-3xl font-bold text-white mb-2;
                }
                p {
                    @apply text-gray-400;
                }
            </style>
            <header>
                <div class="header-content">
                    <h1>Solar Panel Showdown</h1>
                    <p>Compare photovoltaic modules from leading manufacturers</p>
                </div>
            </header>
        `;
    }
}
customElements.define('custom-header', CustomHeader);