Spaces:
Running
Running
File size: 804 Bytes
331435b 67f8845 331435b |
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 |
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
width: 100%;
position: relative;
z-index: 50;
}
header {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-link {
transition: all 0.2s ease;
}
.nav-link:hover {
color: #818cf8;
}
</style>
<header class="py-4 px-6">
<div class="container mx-auto flex justify-between items-center">
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader); |