dannyboy84's picture
needs to be exactly like the mechanics and graphics and gameplay as wormate.io, save it as wormate.io
6a073e2 verified
class GameNav extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
nav {
background: linear-gradient(145deg, #22c55e, #16a34a);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
max-width: 1200px;
margin: 0 auto;
}
.logo {
display: flex;
align-items: center;
font-weight: bold;
font-size: 1.5rem;
color: white;
text-decoration: none;
}
.logo-icon {
margin-right: 0.5rem;
}
.nav-links {
display: flex;
gap: 1.5rem;
}
.nav-link {
color: white;
text-decoration: none;
font-weight: 600;
transition: all 0.3s;
display: flex;
align-items: center;
}
.nav-link:hover {
transform: translateY(-2px);
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.nav-link-icon {
margin-right: 0.3rem;
}
@media (max-width: 640px) {
.nav-container {
flex-direction: column;
padding: 1rem;
}
.nav-links {
margin-top: 1rem;
gap: 1rem;
}
}
</style>
<nav>
<div class="nav-container">
<a href="#" class="logo">
<i data-feather="wind" class="logo-icon"></i>
Wiggly Worms
</a>
<div class="nav-links">
<a href="#" class="nav-link">
<i data-feather="home" class="nav-link-icon"></i>
Home
</a>
<a href="#" class="nav-link">
<i data-feather="award" class="nav-link-icon"></i>
Scores
</a>
<a href="#" class="nav-link">
<i data-feather="settings" class="nav-link-icon"></i>
Settings
</a>
</div>
</div>
</nav>
`;
}
}
customElements.define('game-nav', GameNav);