wandererester / script.js
Quantumbraid's picture
Create script.js
5fb3ba7 verified
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);