hunnid13's picture
fa o analiza si zi-mi ce parere ai
a50c149 verified
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
header {
padding: 1rem 2rem;
color: white;
position: relative;
z-index: 10;
}
.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;
display: flex;
align-items: center;
gap: 0.5rem;
}
nav ul {
display: flex;
gap: 1.5rem;
list-style: none;
}
nav a {
color: white;
text-decoration: none;
font-weight: 500;
transition: opacity 0.2s;
display: flex;
align-items: center;
gap: 0.3rem;
}
nav a:hover {
opacity: 0.8;
}
.icon {
width: 20px;
height: 20px;
}
</style>
<header>
<div class="header-content">
<div class="logo">
<span>RetroGem Hunter 🕹️✨</span>
</div>
<nav>
<ul>
<li><a href="/"><i data-feather="home" class="icon"></i> Home</a></li>
<li><a href="#"><i data-feather="info" class="icon"></i> About</a></li>
<li><a href="#"><i data-feather="help-circle" class="icon"></i> FAQ</a></li>
</ul>
</nav>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader);