Spaces:
Running
Running
File size: 1,437 Bytes
1ec46cb |
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 |
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
header {
background-color: #111827;
padding: 1rem;
border-bottom: 1px solid #1f2937;
}
.header-content {
max-width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
display: flex;
align-items: center;
gap: 0.5rem;
}
.logo-icon {
width: 24px;
height: 24px;
stroke: currentColor;
}
</style>
<header>
<div class="header-content">
<div class="logo">
<svg class="logo-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="4" width="20" height="16" rx="2" ry="2"></rect>
<line x1="2" y1="10" x2="22" y2="10"></line>
<line x1="8" y1="4" x2="8" y2="8"></line>
<line x1="16" y1="4" x2="16" y2="8"></line>
</svg>
MultiStream Magic
</div>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader); |