Spaces:
Runtime error
Runtime error
File size: 1,622 Bytes
5fb3ba7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
class CustomNavbar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
nav {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
}
.nav-link:hover {
color: #d946ef;
}
.nav-link.active {
color: #9333ea;
border-bottom: 2px solid #9333ea;
}
</style>
<nav class="border-b border-gray-800 py-4 sticky top-0 z-50">
<div class="container mx-auto px-4 flex justify-between items-center">
<a href="/" class="text-xl font-bold flex items-center">
<i data-feather="film" class="mr-2 text-purple-500"></i>
WANderFrame
</a>
<div class="hidden md:flex space-x-6">
<a href="/" class="nav-link active">Generator</a>
<a href="#" class="nav-link">Documentation</a>
<a href="#" class="nav-link">Examples</a>
<a href="#" class="nav-link">Community</a>
</div>
<div class="flex items-center space-x-4">
<a href="#" class="text-gray-400 hover:text-purple-500">
<i data-feather="github"></i>
</a>
<a href="#" class="text-gray-400 hover:text-purple-500">
<i data-feather="twitter"></i>
</a>
<button class="md:hidden text-gray-400 hover:text-white">
<i data-feather="menu"></i>
</button>
</div>
</div>
</nav>
`;
}
}
customElements.define('custom-navbar', CustomNavbar); |