Spaces:
Running
Running
| 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); |