Spaces:
Running
Running
File size: 2,157 Bytes
ff37766 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
class CustomNavbar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
nav {
background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(50, 15, 80, 0.9) 100%);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
backdrop-filter: blur(10px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.logo {
color: white;
font-weight: bold;
font-size: 1.25rem;
display: flex;
align-items: center;
}
.logo-icon {
margin-right: 0.5rem;
color: #9f7aea;
}
ul {
display: flex;
gap: 1.5rem;
list-style: none;
margin: 0;
padding: 0;
}
a {
color: white;
text-decoration: none;
transition: color 0.2s;
display: flex;
align-items: center;
}
a:hover {
color: #d6bcfa;
}
.nav-icon {
margin-right: 0.5rem;
width: 1rem;
height: 1rem;
}
@media (max-width: 768px) {
nav {
flex-direction: column;
padding: 1rem;
}
ul {
margin-top: 1rem;
flex-wrap: wrap;
justify-content: center;
}
}
</style>
<nav>
<div class="logo">
<i data-feather="activity" class="logo-icon"></i>
<span>VoiceCraft AI</span>
</div>
<ul>
<li><a href="/"><i data-feather="home" class="nav-icon"></i> Home</a></li>
<li><a href="#"><i data-feather="settings" class="nav-icon"></i> Settings</a></li>
<li><a href="#"><i data-feather="help-circle" class="nav-icon"></i> Help</a></li>
<li><a href="#"><i data-feather="user" class="nav-icon"></i> Account</a></li>
</ul>
</nav>
`;
}
}
customElements.define('custom-navbar', CustomNavbar); |