| class CustomHeader extends HTMLElement { |
| connectedCallback() { |
| this.attachShadow({ mode: 'open' }); |
| this.shadowRoot.innerHTML = ` |
| <style> |
| header { |
| background-color: white; |
| box-shadow: 0 1px 10px rgba(243, 107, 38, 0.1); |
| position: sticky; |
| top: 0; |
| z-index: 50; |
| backdrop-filter: blur(8px); |
| background-color: rgba(255, 255, 255, 0.97); |
| border-bottom: 1px solid rgba(243, 107, 38, 0.1); |
| } |
| .logo { |
| color: #F36B26; |
| font-weight: 700; |
| } |
| .user-avatar { |
| width: 36px; |
| height: 36px; |
| border: 2px solid #F36B26; |
| } |
| </style> |
| <header class="py-4 px-6"> |
| <div class="container mx-auto flex justify-between items-center"> |
| <div class="logo text-xl">ServicePulse Hub</div> |
| <div class="flex items-center space-x-4 space-x-reverse"> |
| <div class="flex items-center space-x-2 space-x-reverse"> |
| <span class="text-gray-700">مرحباً، محمد</span> |
| <div class="user-avatar rounded-full bg-gray-200 flex items-center justify-center"> |
| <i data-feather="user"></i> |
| </div> |
| </div> |
| </div> |
| </div> |
| </header> |
| `; |
| } |
| } |
| customElements.define('custom-header', CustomHeader); |