fukdufydsu's picture
Build a modern, minimalistic website that acts as a directory for AI-generated image prompt components and their corresponding output images.
c00d809 verified
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
}
header {
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
padding: 1rem 0;
}
.dark header {
background: rgba(15, 15, 15, 0.8);
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: 700;
display: flex;
align-items: center;
gap: 0.5rem;
}
nav ul {
display: flex;
list-style: none;
gap: 1.5rem;
}
nav a {
text-decoration: none;
color: #6b7280;
font-weight: 500;
transition: color 0.2s;
position: relative;
}
.dark nav a {
color: #9ca3af;
}
nav a:hover {
color: #111827;
}
.dark nav a:hover {
color: #f9fafb;
}
nav a::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 0;
height: 2px;
background: #111827;
transition: width 0.3s;
}
.dark nav a::after {
background: #f9fafb;
}
nav a:hover::after {
width: 100%;
}
@media (max-width: 768px) {
nav ul {
display: none;
}
}
</style>
<header>
<div class="container">
<div class="logo">
<span>🏗️</span>
<span>PromptForge</span>
</div>
<nav>
<ul>
<li><a href="/">Directory</a></li>
<li><a href="#">Submit</a></li>
<li><a href="#">About</a></li>
</ul>
</nav>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader);