Spaces:
Configuration error
Configuration error
| class CustomHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| } | |
| .header { | |
| background: linear-gradient(90deg, #111827 0%, #1f2937 100%); | |
| border-bottom: 1px solid #374151; | |
| padding: 1rem 0; | |
| } | |
| .container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 1rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| font-weight: 700; | |
| font-size: 1.5rem; | |
| background: linear-gradient(90deg, #10b981, #f97316); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 2rem; | |
| } | |
| .nav-link { | |
| color: #9ca3af; | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: color 0.2s; | |
| } | |
| .nav-link:hover { | |
| color: #10b981; | |
| } | |
| .auth-buttons { | |
| display: flex; | |
| gap: 1rem; | |
| } | |
| .btn { | |
| padding: 0.5rem 1rem; | |
| border-radius: 0.5rem; | |
| font-weight: 500; | |
| transition: all 0.2s; | |
| } | |
| .btn-outline { | |
| border: 1px solid #374151; | |
| background: transparent; | |
| color: #d1d5db; | |
| } | |
| .btn-outline:hover { | |
| border-color: #10b981; | |
| color: #10b981; | |
| } | |
| .btn-primary { | |
| background: linear-gradient(90deg, #10b981, #f97316); | |
| color: white; | |
| border: none; | |
| } | |
| .btn-primary:hover { | |
| opacity: 0.9; | |
| } | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| } | |
| .auth-buttons { | |
| gap: 0.5rem; | |
| } | |
| .btn { | |
| padding: 0.4rem 0.8rem; | |
| font-size: 0.9rem; | |
| } | |
| } | |
| </style> | |
| <header class="header"> | |
| <div class="container"> | |
| <div class="logo"> | |
| <i data-feather="film"></i> | |
| <span>WanVision Studio</span> | |
| </div> | |
| <nav class="nav-links"> | |
| <a href="/" class="nav-link">Home</a> | |
| <a href="#" class="nav-link">Gallery</a> | |
| <a href="#" class="nav-link">Docs</a> | |
| <a href="#" class="nav-link">Pricing</a> | |
| </nav> | |
| <div class="auth-buttons"> | |
| <button class="btn btn-outline"> | |
| <i data-feather="log-in" style="width: 16px; height: 16px;"></i> | |
| <span class="ml-1">Login</span> | |
| </button> | |
| <button class="btn btn-primary"> | |
| <i data-feather="user-plus" style="width: 16px; height: 16px;"></i> | |
| <span class="ml-1">Sign Up</span> | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| `; | |
| // Initialize feather icons after content is added | |
| setTimeout(() => { | |
| feather.replace(); | |
| }, 0); | |
| } | |
| } | |
| customElements.define('custom-header', CustomHeader); |