JohnSillis's picture
Pump Selector
38baaaa verified
Raw History Blame Contribute Delete
1.93 kB
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
.header-container {
background-color: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.nav-link:hover {
color: #2563eb;
}
</style>
<header class="header-container">
<div class="container mx-auto px-4 py-4">
<div class="flex justify-between items-center">
<div class="flex items-center">
<i data-feather="droplet" class="text-blue-600 mr-2"></i>
<a href="/" class="text-xl font-bold text-blue-600">PumpSelectPro</a>
</div>
<nav class="hidden md:block">
<ul class="flex space-x-8">
<li><a href="#" class="nav-link text-gray-600 hover:text-blue-600 transition-colors">Products</a></li>
<li><a href="#" class="nav-link text-gray-600 hover:text-blue-600 transition-colors">Solutions</a></li>
<li><a href="#" class="nav-link text-gray-600 hover:text-blue-600 transition-colors">Resources</a></li>
<li><a href="#" class="nav-link text-gray-600 hover:text-blue-600 transition-colors">Contact</a></li>
</ul>
</nav>
<div class="flex items-center space-x-4">
<button class="text-gray-600 hover:text-blue-600">
<i data-feather="search"></i>
</button>
<button class="text-gray-600 hover:text-blue-600">
<i data-feather="shopping-cart"></i>
</button>
<button class="md:hidden text-gray-600 hover:text-blue-600">
<i data-feather="menu"></i>
</button>
</div>
</div>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader);