jeffMunya's picture
how do i dep[loy the app
11bf4da verified
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
header {
background: linear-gradient(135deg, #6b46c1 0%, #805ad5 100%);
color: white;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
max-width: 1200px;
margin: 0 auto;
}
.logo {
font-weight: 700;
font-size: 1.5rem;
display: flex;
align-items: center;
}
.logo i {
margin-right: 0.5rem;
}
.nav-links {
display: flex;
gap: 1.5rem;
}
.nav-links a {
color: white;
text-decoration: none;
font-weight: 500;
transition: opacity 0.2s;
}
.nav-links a:hover {
opacity: 0.8;
}
@media (max-width: 768px) {
nav {
flex-direction: column;
gap: 1rem;
padding: 1rem;
}
.nav-links {
width: 100%;
justify-content: space-around;
}
}
</style>
<header>
<nav>
<div class="logo">
<i data-feather="rocket"></i>
<span>Deploy Wizard</span>
</div>
<div class="nav-links">
<a href="/">Home</a>
<a href="#platforms">Platforms</a>
<a href="#steps">Steps</a>
<a href="#deploy">Deploy</a>
</div>
</nav>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader);