Spaces:
Running
Running
File size: 2,162 Bytes
8f8aecf 3f579ef 8f8aecf 3f579ef 8f8aecf 3f579ef 8f8aecf 3f579ef 8f8aecf 3f579ef 8f8aecf 3f579ef 8f8aecf 3f579ef 8f8aecf 3f579ef 8f8aecf bbe879a |
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 76 77 78 79 80 |
class CustomNavbar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
nav {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 102, 0, 0.1);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 1rem 0;
}
.nav-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;
color: #ff6600;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
align-items: center;
}
.nav-links a {
color: #374151;
text-decoration: none;
font-weight: 500;
transition: all 0.3s ease;
}
.nav-links a:hover {
color: #ff6600;
}
.mobile-menu-btn {
display: none;
background: none;
border: none;
cursor: pointer;
color: #374151;
}
@media (max-width: 768px) {
.nav-links {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
}
}
</style>
<nav>
<div class="nav-container">
<a href="index.html" class="logo">NanoMatter</a>
<div class="nav-links">
<a href="index.html">Home</a>
<a href="products.html">Products</a>
<a href="index.html#about">About</a>
<a href="index.html#technologies">Technologies</a>
<a href="index.html#service">Services</a>
<a href="index.html#partnerships">Partnerships</a>
<a href="index.html#contact">Contact</a>
</div>
</div>
</nav>
`;
}
}
customElements.define('custom-navbar', CustomNavbar); |