Spaces:
Running
Running
| class CustomHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 1rem 1.5rem; | |
| background: rgba(255,255,255,0.8); | |
| backdrop-filter: blur(10px); | |
| border-bottom: 1px solid #e5e7eb; | |
| } | |
| .dark header { | |
| background: rgba(17,24,39,0.8); | |
| border-color: #374151; | |
| } | |
| .logo { | |
| font-weight: 800; | |
| font-size: 1.25rem; | |
| color: #ff6a00; | |
| letter-spacing: -0.5px; | |
| } | |
| nav a { | |
| margin-left: 1rem; | |
| text-decoration: none; | |
| color: #111827; | |
| font-weight: 500; | |
| } | |
| .dark nav a { | |
| color: #f3f4f6; | |
| } | |
| nav a:hover { | |
| color: #ff6a00; | |
| } | |
| @media (max-width: 640px) { | |
| nav { | |
| display: none; | |
| } | |
| } | |
| </style> | |
| <header> | |
| <div class="logo">BistroByte</div> | |
| <nav> | |
| <a href="index.html">Home</a> | |
| <a href="about.html">About</a> | |
| <a href="hours.html">Hours</a> | |
| <a href="gallery.html">Gallery</a> | |
| <a href="contact.html">Contact</a> | |
| </nav> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-header', CustomHeader); |