Spaces:
Running
Running
| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| nav { | |
| background: #000000; | |
| padding: 1rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| box-shadow: 0 4px 6px -1px rgba(255, 140, 0, 0.2); | |
| border-bottom: 1px solid #ff8c00; | |
| } | |
| .logo { | |
| color: #ff8c00; | |
| font-weight: bold; | |
| font-size: 1.5rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| ul { | |
| display: flex; | |
| gap: 1.5rem; | |
| list-style: none; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| a { | |
| color: #ff8c00; | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: all 0.2s; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.3rem; | |
| } | |
| a:hover { | |
| color: #ffffff; | |
| transform: translateY(-2px); | |
| } | |
| @media (max-width: 768px) { | |
| nav { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| ul { | |
| width: 100%; | |
| justify-content: space-around; | |
| } | |
| } | |
| </style> | |
| <nav> | |
| <a href="/" class="logo"> | |
| <i data-feather="code"></i> | |
| Quacky Code | |
| </a> | |
| <ul> | |
| <li><a href="/"><i data-feather="home"></i> Home</a></li> | |
| <li><a href="/about.html"><i data-feather="info"></i> About</a></li> | |
| <li><a href="/saved.html"><i data-feather="save"></i> Saved Scripts</a></li> | |
| </ul> | |
| </nav> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-navbar', CustomNavbar); |