File size: 1,582 Bytes
a8e626b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomHeader extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                header {
                    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                    color: white;
                    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
                }
                
                .header-content {
                    max-width: 1200px;
                    margin: 0 auto;
                }
                
                .logo {
                    font-weight: 700;
                    letter-spacing: 1px;
                }
                
                .task-count {
                    background-color: rgba(255, 255, 255, 0.2);
                    border-radius: 9999px;
                    padding: 2px 8px;
                    font-size: 0.8rem;
                }
            </style>
            <header class="py-6">
                <div class="header-content px-6">
                    <div class="flex items-center justify-between">
                        <div class="flex items-center space-x-2">
                            <i data-feather="check-circle" class="text-white"></i>
                            <h1 class="logo text-xl">Tasky McTaskface</h1>
                        </div>
                        <span class="task-count" id="taskCounter">0 tasks</span>
                    </div>
                </div>
            </header>
        `;
    }
}

customElements.define('custom-header', CustomHeader);