Roas's picture
Here’s a well-structured prompt in English for generating a web application based on your request:
c06b3f3 verified
Raw History Blame Contribute Delete
2.28 kB
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
header {
background-color: #4f46e5;
color: white;
padding: 1rem 0;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.header-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: bold;
display: flex;
align-items: center;
gap: 0.5rem;
}
.logo i {
stroke-width: 2.5px;
}
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.9;
}
nav i {
width: 18px;
height: 18px;
}
@media (max-width: 768px) {
.header-container {
flex-direction: column;
gap: 1rem;
}
nav ul {
flex-wrap: wrap;
justify-content: center;
gap: 1rem;
}
}
</style>
<header>
<div class="header-container">
<a href="#" class="logo">
<i data-feather="code"></i>
<span>COBOL Perform Explorer</span>
</a>
<nav>
<ul>
<li><a href="#"><i data-feather="home"></i> Accueil</a></li>
<li><a href="#"><i data-feather="book"></i> Cours</a></li>
<li><a href="#"><i data-feather="file-text"></i> Exercices</a></li>
<li><a href="#"><i data-feather="help-circle"></i> Aide</a></li>
</ul>
</nav>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader);