Spaces:
Running
Running
| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| nav { | |
| background: rgba(255, 255, 255, 0.8); | |
| backdrop-filter: blur(10px); | |
| padding: 1rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); | |
| position: relative; | |
| z-index: 100; | |
| } | |
| .logo { | |
| font-weight: 800; | |
| font-size: 1.5rem; | |
| background: linear-gradient(to right, #9a6bff, #ff6b9a); | |
| -webkit-background-clip: text; | |
| background-clip: text; | |
| color: transparent; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| ul { | |
| display: flex; | |
| gap: 2rem; | |
| list-style: none; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| a { | |
| color: #4a5568; | |
| text-decoration: none; | |
| font-weight: 600; | |
| position: relative; | |
| padding: 0.5rem 0; | |
| transition: all 0.3s ease; | |
| } | |
| a:hover { | |
| color: #9a6bff; | |
| } | |
| a::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| width: 0; | |
| height: 2px; | |
| background: linear-gradient(to right, #9a6bff, #ff6b9a); | |
| transition: width 0.3s ease; | |
| } | |
| a:hover::after { | |
| width: 100%; | |
| } | |
| @media (max-width: 768px) { | |
| nav { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| ul { | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| text-align: center; | |
| } | |
| } | |
| </style> | |
| <nav> | |
| <div class="logo"> | |
| <i data-feather="globe"></i> | |
| GXS Blue Transformation | |
| </div> | |
| <ul> | |
| <li><a href="/">Home</a></li> | |
| <li><a href="/about.html">About</a></li> | |
| <li><a href="/solutions.html">Solutions</a></li> | |
| <li><a href="/projects.html">Projects</a></li> | |
| <li><a href="/contact.html">Contact</a></li> | |
| </ul> | |
| </nav> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-navbar', CustomNavbar); |