Spaces:
Running
Running
| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| nav { | |
| background: rgba(255, 255, 255, 0.95); | |
| backdrop-filter: blur(10px); | |
| border-bottom: 1px solid rgba(255, 102, 0, 0.1); | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| z-index: 1000; | |
| padding: 1rem 0; | |
| } | |
| .nav-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 1rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| color: #ff6600; | |
| text-decoration: none; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 2rem; | |
| align-items: center; | |
| } | |
| .nav-links a { | |
| color: #374151; | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: all 0.3s ease; | |
| } | |
| .nav-links a:hover { | |
| color: #ff6600; | |
| } | |
| .mobile-menu-btn { | |
| display: none; | |
| background: none; | |
| border: none; | |
| cursor: pointer; | |
| color: #374151; | |
| } | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| position: absolute; | |
| top: 100%; | |
| left: 0; | |
| right: 0; | |
| } | |
| } | |
| </style> | |
| <nav> | |
| <div class="nav-container"> | |
| <a href="index.html" class="logo">NanoMatter</a> | |
| <div class="nav-links"> | |
| <a href="index.html">Home</a> | |
| <a href="products.html">Products</a> | |
| <a href="index.html#about">About</a> | |
| <a href="index.html#technologies">Technologies</a> | |
| <a href="index.html#service">Services</a> | |
| <a href="index.html#partnerships">Partnerships</a> | |
| <a href="index.html#contact">Contact</a> | |
| </div> | |
| </div> | |
| </nav> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-navbar', CustomNavbar); |