Spaces:
Running
Running
File size: 1,743 Bytes
8bbd13a | 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 | class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
header {
background: linear-gradient(135deg, #10b981 0%, #059669 50%, #f97316 100%);
color: white;
padding: 1rem 0;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
font-size: 1.5rem;
font-weight: bold;
text-decoration: none;
color: white;
}
.logo:hover {
transform: scale(1.05);
}
.logo-icon {
margin-right: 0.5rem;
font-size: 2rem;
}
</style>
<header>
<div class="container">
<a href="#" class="logo">
<span class="logo-icon">💪</span>
FitTransform Pro
</a>
<div>
<span style="font-size: 0.9rem; opacity: 0.9;">AI Body Transformation</span>
</div>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader); |