File size: 1,983 Bytes
2f7542e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
class CustomHeader extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                :host {
                    display: block;
                    width: 100%;
                    background-color: white;
                    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                }
                .header-container {
                    max-width: 1200px;
                    margin: 0 auto;
                    padding: 1rem 2rem;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                }
                .logo {
                    font-weight: 700;
                    font-size: 1.5rem;
                    color: var(--primary);
                    text-decoration: none;
                }
                .nav-links {
                    display: flex;
                    gap: 1.5rem;
                }
                .nav-links a {
                    color: var(--dark);
                    text-decoration: none;
                    font-weight: 500;
                    transition: color 0.2s;
                }
                .nav-links a:hover {
                    color: var(--primary);
                }
                @media (max-width: 768px) {
                    .header-container {
                        flex-direction: column;
                        gap: 1rem;
                    }
                }
            </style>
            <header class="header-container">
                <a href="/" class="logo">WordPress Wizard</a>
                <nav class="nav-links">
                    <a href="#">Home</a>
                    <a href="#">Design</a>
                    <a href="#">Components</a>
                    <a href="#">Settings</a>
                </nav>
            </header>
        `;
    }
}
customElements.define('custom-header', CustomHeader);