Spaces:
Running
Running
| class CustomHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| header { | |
| background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)); | |
| backdrop-filter: blur(10px); | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.1); | |
| } | |
| .nav-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 1rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| font-size: 1.5rem; | |
| font-weight: bold; | |
| background: linear-gradient(135deg, #667eea, #764ba2); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| text-decoration: none; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| nav { | |
| display: flex; | |
| gap: 2rem; | |
| align-items: center; | |
| } | |
| nav a { | |
| color: #4a5568; | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: color 0.3s; | |
| } | |
| nav a:hover { | |
| color: #667eea; | |
| } | |
| .nav-actions { | |
| display: flex; | |
| gap: 1rem; | |
| align-items: center; | |
| } | |
| .btn { | |
| padding: 0.5rem 1rem; | |
| border-radius: 0.5rem; | |
| font-weight: 500; | |
| transition: all 0.3s; | |
| cursor: pointer; | |
| border: none; | |
| text-decoration: none; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .btn-outline { | |
| background: transparent; | |
| color: #667eea; | |
| border: 2px solid #667eea; | |
| } | |
| .btn-outline:hover { | |
| background: #667eea; | |
| color: white; | |
| } | |
| .btn-primary { | |
| background: linear-gradient(135deg, #667eea, #764ba2); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); | |
| } | |
| @media (max-width: 768px) { | |
| nav { | |
| display: none; | |
| } | |
| .nav-container { | |
| padding: 1rem; | |
| } | |
| } | |
| </style> | |
| <header> | |
| <div class="nav-container"> | |
| <a href="/" class="logo"> | |
| <span>🎨</span> | |
| <span>3D Magic Studio</span> | |
| </a> | |
| <nav> | |
| <a href="#features">Features</a> | |
| <a href="#gallery">Gallery</a> | |
| <a href="#pricing">Pricing</a> | |
| <a href="#docs">Docs</a> | |
| </nav> | |
| <div class="nav-actions"> | |
| <button class="btn btn-outline"> | |
| <i data-feather="log-in" class="w-4 h-4"></i> | |
| Sign In | |
| </button> | |
| <button class="btn btn-primary"> | |
| <i data-feather="plus-circle" class="w-4 h-4"></i> | |
| Get Started | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-header', CustomHeader); |