| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| nav { | |
| background: rgba(255, 255, 255, 0.1); | |
| backdrop-filter: blur(10px); | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.2); | |
| padding: 1rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| position: sticky; | |
| top: 0; | |
| z-index: 1000; | |
| } | |
| .logo { | |
| color: white; | |
| font-weight: bold; | |
| font-size: 1.5rem; | |
| background: linear-gradient(135deg, #667eea, #764ba2); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| } | |
| ul { | |
| display: flex; | |
| gap: 2rem; | |
| list-style: none; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| a { | |
| color: white; | |
| text-decoration: none; | |
| transition: all 0.3s ease; | |
| padding: 0.5rem 1rem; | |
| border-radius: 0.5rem; | |
| font-weight: 500; | |
| } | |
| a:hover { | |
| background: rgba(255, 255, 255, 0.1); | |
| } | |
| a.active { | |
| background: linear-gradient(135deg, #667eea, #764ba2); | |
| } | |
| @media (max-width: 768px) { | |
| nav { | |
| padding: 1rem; | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| ul { | |
| gap: 1rem; | |
| } | |
| } | |
| </style> | |
| <nav> | |
| <div class="logo">JCode Evolution</div> | |
| <ul> | |
| <li><a href="/">Home</a></li> | |
| <li><a href="/timeline.html">Timeline</a></li> | |
| <li><a href="/features.html">Features</a></li> | |
| <li><a href="/changelog.html">Full Log</a></li> | |
| </ul> | |
| </nav> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-navbar', CustomNavbar); |