Spaces:
Running
Running
File size: 2,098 Bytes
469f625 1c52982 469f625 1c52982 469f625 1c52982 469f625 1c52982 469f625 |
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
class NavHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
.navbar {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.logo {
font-size: 1.5rem;
font-weight: 700;
background: linear-gradient(135deg, #3b82f6 0%, #14b8a6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.nav-link {
position: relative;
transition: color 0.3s ease;
}
.nav-link::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: -4px;
left: 50%;
background-color: #3b82f6;
transition: all 0.3s ease;
}
.nav-link:hover::after {
width: 100%;
left: 0;
}
@media (max-width: 768px) {
}
</style>
<nav class="navbar sticky top-0 z-40 px-4 md:px-6 py-4">
<div class="container mx-auto flex justify-center items-center">
<div class="flex items-center gap-2">
<i data-feather="check-square" class="w-8 h-8 text-primary-500"></i>
<span class="logo">TaskMail</span>
</div>
</div>
</nav>
</nav>
`;
// Initialize feather icons
setTimeout(() => {
feather.replace();
}, 0);
}
}
customElements.define('nav-header', NavHeader); |