Spaces:
Running
Running
make clone this website https://huggingface.co/spaces/mithunparambath/nanomatter.tech
Browse files- components/hero-section.js +125 -0
- components/navbar.js +12 -1
- index.html +5 -136
- products.html +3 -2
- script.js +18 -1
components/hero-section.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class HeroSection extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.hero-section {
|
| 7 |
+
min-height: 100vh;
|
| 8 |
+
display: flex;
|
| 9 |
+
align-items: center;
|
| 10 |
+
justify-content: center;
|
| 11 |
+
position: relative;
|
| 12 |
+
overflow: hidden;
|
| 13 |
+
}
|
| 14 |
+
.hero-video {
|
| 15 |
+
position: absolute;
|
| 16 |
+
top: 0;
|
| 17 |
+
left: 0;
|
| 18 |
+
width: 100%;
|
| 19 |
+
height: 100%;
|
| 20 |
+
object-fit: cover;
|
| 21 |
+
}
|
| 22 |
+
.video-overlay {
|
| 23 |
+
position: absolute;
|
| 24 |
+
top: 0;
|
| 25 |
+
left: 0;
|
| 26 |
+
width: 100%;
|
| 27 |
+
height: 100%;
|
| 28 |
+
background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4);
|
| 29 |
+
}
|
| 30 |
+
.hero-content {
|
| 31 |
+
position: relative;
|
| 32 |
+
z-index: 10;
|
| 33 |
+
text-align: center;
|
| 34 |
+
color: white;
|
| 35 |
+
max-width: 800px;
|
| 36 |
+
margin: 0 auto;
|
| 37 |
+
padding: 0 1rem;
|
| 38 |
+
}
|
| 39 |
+
.hero-title {
|
| 40 |
+
font-size: 3.5rem;
|
| 41 |
+
font-weight: 700;
|
| 42 |
+
margin-bottom: 1.5rem;
|
| 43 |
+
line-height: 1.2;
|
| 44 |
+
}
|
| 45 |
+
.hero-subtitle {
|
| 46 |
+
font-size: 1.5rem;
|
| 47 |
+
margin-bottom: 2rem;
|
| 48 |
+
opacity: 0.9;
|
| 49 |
+
}
|
| 50 |
+
.hero-buttons {
|
| 51 |
+
display: flex;
|
| 52 |
+
gap: 1rem;
|
| 53 |
+
justify-content: center;
|
| 54 |
+
flex-wrap: wrap;
|
| 55 |
+
}
|
| 56 |
+
.btn-primary {
|
| 57 |
+
background: #ff6600;
|
| 58 |
+
color: white;
|
| 59 |
+
padding: 1rem 2rem;
|
| 60 |
+
border-radius: 0.5rem;
|
| 61 |
+
font-weight: 600;
|
| 62 |
+
transition: all 0.3s ease;
|
| 63 |
+
border: none;
|
| 64 |
+
cursor: pointer;
|
| 65 |
+
text-decoration: none;
|
| 66 |
+
display: inline-flex;
|
| 67 |
+
align-items: center;
|
| 68 |
+
gap: 0.5rem;
|
| 69 |
+
}
|
| 70 |
+
.btn-primary:hover {
|
| 71 |
+
background: #e55b00;
|
| 72 |
+
transform: scale(1.05);
|
| 73 |
+
}
|
| 74 |
+
.btn-secondary {
|
| 75 |
+
background: transparent;
|
| 76 |
+
color: #ff6600;
|
| 77 |
+
padding: 1rem 2rem;
|
| 78 |
+
border: 2px solid #ff6600;
|
| 79 |
+
border-radius: 0.5rem;
|
| 80 |
+
font-weight: 600;
|
| 81 |
+
transition: all 0.3s ease;
|
| 82 |
+
text-decoration: none;
|
| 83 |
+
display: inline-flex;
|
| 84 |
+
align-items: center;
|
| 85 |
+
gap: 0.5rem;
|
| 86 |
+
}
|
| 87 |
+
.btn-secondary:hover {
|
| 88 |
+
background: #ff6600;
|
| 89 |
+
color: white;
|
| 90 |
+
}
|
| 91 |
+
@media (max-width: 768px) {
|
| 92 |
+
.hero-title {
|
| 93 |
+
font-size: 2.5rem;
|
| 94 |
+
}
|
| 95 |
+
.hero-subtitle {
|
| 96 |
+
font-size: 1.25rem;
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
</style>
|
| 100 |
+
<section class="hero-section">
|
| 101 |
+
<video class="hero-video" autoplay muted loop playsinline>
|
| 102 |
+
<source src="https://huggingface.co/spaces/mithunparambath/nanomatter.tech/resolve/main/videos/Untitled%20design%20(1).mp4" type="video/mp4">
|
| 103 |
+
Your browser does not support the video tag.
|
| 104 |
+
</video>
|
| 105 |
+
<div class="video-overlay"></div>
|
| 106 |
+
<div class="hero-content">
|
| 107 |
+
<h1 class="hero-title">Enabling Next-Generation<br>Semiconductor Innovation</h1>
|
| 108 |
+
<p class="hero-subtitle">Advanced deposition tools for FEOL and BEOL</p>
|
| 109 |
+
<div class="hero-buttons">
|
| 110 |
+
<a href="#technologies" class="btn-primary">
|
| 111 |
+
<i data-feather="layers"></i>
|
| 112 |
+
Explore Technologies
|
| 113 |
+
</a>
|
| 114 |
+
<a href="#contact" class="btn-secondary">
|
| 115 |
+
<i data-feather="mail"></i>
|
| 116 |
+
Get in Touch
|
| 117 |
+
</a>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
</section>
|
| 121 |
+
`;
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
customElements.define('hero-section', HeroSection);
|
components/navbar.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
class CustomNavbar extends HTMLElement {
|
| 2 |
connectedCallback() {
|
| 3 |
this.attachShadow({ mode: 'open' });
|
|
@@ -56,12 +57,22 @@ class CustomNavbar extends HTMLElement {
|
|
| 56 |
top: 100%;
|
| 57 |
left: 0;
|
| 58 |
right: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
}
|
| 60 |
}
|
| 61 |
</style>
|
| 62 |
<nav>
|
| 63 |
<div class="nav-container">
|
| 64 |
<a href="index.html" class="logo">NanoMatter</a>
|
|
|
|
|
|
|
|
|
|
| 65 |
<div class="nav-links">
|
| 66 |
<a href="index.html">Home</a>
|
| 67 |
<a href="products.html">Products</a>
|
|
@@ -77,4 +88,4 @@ class CustomNavbar extends HTMLElement {
|
|
| 77 |
}
|
| 78 |
}
|
| 79 |
|
| 80 |
-
customElements.define('custom-navbar', CustomNavbar);
|
|
|
|
| 1 |
+
|
| 2 |
class CustomNavbar extends HTMLElement {
|
| 3 |
connectedCallback() {
|
| 4 |
this.attachShadow({ mode: 'open' });
|
|
|
|
| 57 |
top: 100%;
|
| 58 |
left: 0;
|
| 59 |
right: 0;
|
| 60 |
+
background: rgba(255, 255, 255, 0.95);
|
| 61 |
+
padding: 1rem;
|
| 62 |
+
flex-direction: column;
|
| 63 |
+
gap: 1rem;
|
| 64 |
+
}
|
| 65 |
+
.mobile-menu-btn {
|
| 66 |
+
display: block;
|
| 67 |
}
|
| 68 |
}
|
| 69 |
</style>
|
| 70 |
<nav>
|
| 71 |
<div class="nav-container">
|
| 72 |
<a href="index.html" class="logo">NanoMatter</a>
|
| 73 |
+
<button class="mobile-menu-btn">
|
| 74 |
+
<i data-feather="menu"></i>
|
| 75 |
+
</button>
|
| 76 |
<div class="nav-links">
|
| 77 |
<a href="index.html">Home</a>
|
| 78 |
<a href="products.html">Products</a>
|
|
|
|
| 88 |
}
|
| 89 |
}
|
| 90 |
|
| 91 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -13,34 +13,6 @@
|
|
| 13 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 14 |
<style>
|
| 15 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
|
| 16 |
-
.atom-animation {
|
| 17 |
-
position: absolute;
|
| 18 |
-
width: 100%;
|
| 19 |
-
height: 100%;
|
| 20 |
-
top: 0;
|
| 21 |
-
left: 0;
|
| 22 |
-
pointer-events: none;
|
| 23 |
-
}
|
| 24 |
-
.hero-background {
|
| 25 |
-
position: relative;
|
| 26 |
-
overflow: hidden;
|
| 27 |
-
}
|
| 28 |
-
.hero-video {
|
| 29 |
-
position: absolute;
|
| 30 |
-
top: 0;
|
| 31 |
-
left: 0;
|
| 32 |
-
width: 100%;
|
| 33 |
-
height: 100%;
|
| 34 |
-
object-fit: cover;
|
| 35 |
-
}
|
| 36 |
-
.video-overlay {
|
| 37 |
-
position: absolute;
|
| 38 |
-
top: 0;
|
| 39 |
-
left: 0;
|
| 40 |
-
width: 100%;
|
| 41 |
-
height: 100%;
|
| 42 |
-
background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
|
| 43 |
-
}
|
| 44 |
.grid-pattern {
|
| 45 |
background-image: linear-gradient(rgba(255,102,0,0.05) 1px, transparent 1px),
|
| 46 |
linear-gradient(90deg, rgba(255,102,0,0.05) 1px, transparent 1px);
|
|
@@ -50,31 +22,8 @@
|
|
| 50 |
</head>
|
| 51 |
<body class="bg-white text-gray-800 font-poppins">
|
| 52 |
<custom-navbar></custom-navbar>
|
| 53 |
-
|
| 54 |
-
<section id="hero" class="relative min-h-screen flex items-center justify-center overflow-hidden hero-background">
|
| 55 |
-
<video class="hero-video" autoplay muted loop playsinline>
|
| 56 |
-
<source src="https://huggingface.co/spaces/mithunparambath/quantumcraft-nanosystems/resolve/main/videos/Untitled design (1).mp4" type="video/mp4">
|
| 57 |
-
Your browser does not support the video tag.
|
| 58 |
-
</video>
|
| 59 |
=======
|
| 60 |
-
<div class="atom-animation" id="atomCanvas"></div>
|
| 61 |
-
<div class="relative z-20 text-center px-4 max-w-6xl mx-auto">
|
| 62 |
-
<h1 class="text-5xl md:text-7xl font-bold mb-6 text-white">
|
| 63 |
-
Enabling Next-Generation<br>Semiconductor Innovation
|
| 64 |
-
</h1>
|
| 65 |
-
<p class="text-xl md:text-2xl text-orange-100 mb-8 max-w-3xl mx-auto">
|
| 66 |
-
Advanced deposition tools for FEOL and BEOL
|
| 67 |
-
</p>
|
| 68 |
-
<div class="flex flex-col sm:flex-row gap-4 justify-center">
|
| 69 |
-
<a href="#technologies" class="bg-orange-500 hover:bg-orange-600 text-white px-8 py-4 rounded-lg font-semibold transition-all duration-300 transform hover:scale-105 shadow-lg">
|
| 70 |
-
Explore Technologies
|
| 71 |
-
</a>
|
| 72 |
-
<a href="#contact" class="border border-orange-500 text-orange-500 hover:bg-orange-500 hover:text-white px-8 py-4 rounded-lg font-semibold transition-all duration-300 shadow-md">
|
| 73 |
-
Get in Touch
|
| 74 |
-
</a>
|
| 75 |
-
</div>
|
| 76 |
-
</div>
|
| 77 |
-
</section>
|
| 78 |
<!-- About Section -->
|
| 79 |
<section id="about" class="py-20 px-4 bg-gray-50">
|
| 80 |
<div class="max-w-6xl mx-auto">
|
|
@@ -421,91 +370,11 @@
|
|
| 421 |
<custom-footer></custom-footer>
|
| 422 |
<script src="components/navbar.js"></script>
|
| 423 |
<script src="components/footer.js"></script>
|
| 424 |
-
<script src="
|
| 425 |
-
<script>
|
|
|
|
| 426 |
// Initialize feather icons
|
| 427 |
feather.replace();
|
| 428 |
-
|
| 429 |
-
// Simple atom animation for hero section
|
| 430 |
-
function initAtomAnimation() {
|
| 431 |
-
const canvas = document.createElement('canvas');
|
| 432 |
-
const container = document.getElementById('atomCanvas');
|
| 433 |
-
container.appendChild(canvas);
|
| 434 |
-
|
| 435 |
-
const ctx = canvas.getContext('2d');
|
| 436 |
-
let width = container.clientWidth;
|
| 437 |
-
let height = container.clientHeight;
|
| 438 |
-
|
| 439 |
-
canvas.width = width;
|
| 440 |
-
canvas.height = height;
|
| 441 |
-
|
| 442 |
-
const atoms = [];
|
| 443 |
-
const numAtoms = 15;
|
| 444 |
-
|
| 445 |
-
for (let i = 0; i < numAtoms; i++) {
|
| 446 |
-
atoms.push({
|
| 447 |
-
x: Math.random() * width,
|
| 448 |
-
y: Math.random() * height,
|
| 449 |
-
radius: Math.random() * 3 + 1,
|
| 450 |
-
speedX: (Math.random() - 0.5) * 0.5,
|
| 451 |
-
speedY: (Math.random() - 0.5) * 0.5,
|
| 452 |
-
connections: []
|
| 453 |
-
});
|
| 454 |
-
}
|
| 455 |
-
|
| 456 |
-
function animate() {
|
| 457 |
-
ctx.clearRect(0, 0, width, height);
|
| 458 |
-
|
| 459 |
-
// Draw connections
|
| 460 |
-
ctx.strokeStyle = 'rgba(255,102,0,0.2)';
|
| 461 |
-
ctx.lineWidth = 1;
|
| 462 |
-
|
| 463 |
-
for (let i = 0; i < atoms.length; i++) {
|
| 464 |
-
for (let j = i + 1; j < atoms.length; j++) {
|
| 465 |
-
const dx = atoms[i].x - atoms[j].x;
|
| 466 |
-
const dy = atoms[i].y - atoms[j].y;
|
| 467 |
-
const distance = Math.sqrt(dx * dx + dy * dy);
|
| 468 |
-
|
| 469 |
-
if (distance < 150) {
|
| 470 |
-
ctx.beginPath();
|
| 471 |
-
ctx.moveTo(atoms[i].x, atoms[i].y);
|
| 472 |
-
ctx.lineTo(atoms[j].x, atoms[j].y);
|
| 473 |
-
ctx.stroke();
|
| 474 |
-
}
|
| 475 |
-
}
|
| 476 |
-
}
|
| 477 |
-
|
| 478 |
-
// Draw atoms
|
| 479 |
-
for (let atom of atoms) {
|
| 480 |
-
ctx.beginPath();
|
| 481 |
-
ctx.arc(atom.x, atom.y, atom.radius, 0, Math.PI * 2);
|
| 482 |
-
ctx.fillStyle = 'rgba(255,102,0,0.6)';
|
| 483 |
-
ctx.fill();
|
| 484 |
-
|
| 485 |
-
// Update position
|
| 486 |
-
atom.x += atom.speedX;
|
| 487 |
-
atom.y += atom.speedY;
|
| 488 |
-
|
| 489 |
-
// Bounce off walls
|
| 490 |
-
if (atom.x <= 0 || atom.x >= width) atom.speedX *= -1;
|
| 491 |
-
if (atom.y <= 0 || atom.y >= height) atom.speedY *= -1;
|
| 492 |
-
}
|
| 493 |
-
|
| 494 |
-
requestAnimationFrame(animate);
|
| 495 |
-
}
|
| 496 |
-
|
| 497 |
-
animate();
|
| 498 |
-
|
| 499 |
-
window.addEventListener('resize', () => {
|
| 500 |
-
width = container.clientWidth;
|
| 501 |
-
height = container.clientHeight;
|
| 502 |
-
canvas.width = width;
|
| 503 |
-
canvas.height = height;
|
| 504 |
-
});
|
| 505 |
-
}
|
| 506 |
-
|
| 507 |
-
// Initialize animation when page loads
|
| 508 |
-
document.addEventListener('DOMContentLoaded', initAtomAnimation);
|
| 509 |
-
</script>
|
| 510 |
</body>
|
| 511 |
</html>
|
|
|
|
| 13 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 14 |
<style>
|
| 15 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
.grid-pattern {
|
| 17 |
background-image: linear-gradient(rgba(255,102,0,0.05) 1px, transparent 1px),
|
| 18 |
linear-gradient(90deg, rgba(255,102,0,0.05) 1px, transparent 1px);
|
|
|
|
| 22 |
</head>
|
| 23 |
<body class="bg-white text-gray-800 font-poppins">
|
| 24 |
<custom-navbar></custom-navbar>
|
| 25 |
+
<hero-section></hero-section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
=======
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
<!-- About Section -->
|
| 28 |
<section id="about" class="py-20 px-4 bg-gray-50">
|
| 29 |
<div class="max-w-6xl mx-auto">
|
|
|
|
| 370 |
<custom-footer></custom-footer>
|
| 371 |
<script src="components/navbar.js"></script>
|
| 372 |
<script src="components/footer.js"></script>
|
| 373 |
+
<script src="components/hero-section.js"></script>
|
| 374 |
+
<script src="script.js"></script>
|
| 375 |
+
<script>
|
| 376 |
// Initialize feather icons
|
| 377 |
feather.replace();
|
| 378 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 379 |
</body>
|
| 380 |
</html>
|
products.html
CHANGED
|
@@ -255,8 +255,9 @@
|
|
| 255 |
<custom-footer></custom-footer>
|
| 256 |
<script src="components/navbar.js"></script>
|
| 257 |
<script src="components/footer.js"></script>
|
| 258 |
-
<script src="
|
| 259 |
-
<script>
|
|
|
|
| 260 |
feather.replace();
|
| 261 |
</script>
|
| 262 |
</body>
|
|
|
|
| 255 |
<custom-footer></custom-footer>
|
| 256 |
<script src="components/navbar.js"></script>
|
| 257 |
<script src="components/footer.js"></script>
|
| 258 |
+
<script src="components/hero-section.js"></script>
|
| 259 |
+
<script src="script.js"></script>
|
| 260 |
+
<script>
|
| 261 |
feather.replace();
|
| 262 |
</script>
|
| 263 |
</body>
|
script.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
|
|
| 1 |
// Main JavaScript file for NanoMatter Technologies
|
| 2 |
|
| 3 |
document.addEventListener('DOMContentLoaded', function() {
|
| 4 |
// Initialize all components and animations
|
| 5 |
initScrollAnimations();
|
| 6 |
initFormHandling();
|
|
|
|
| 7 |
});
|
| 8 |
|
| 9 |
function initScrollAnimations() {
|
|
@@ -56,6 +58,21 @@ function initFormHandling() {
|
|
| 56 |
}
|
| 57 |
}
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
// Smooth scrolling for anchor links
|
| 60 |
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 61 |
anchor.addEventListener('click', function (e) {
|
|
@@ -82,4 +99,4 @@ window.addEventListener('scroll', function() {
|
|
| 82 |
}
|
| 83 |
});
|
| 84 |
}
|
| 85 |
-
}
|
|
|
|
| 1 |
+
|
| 2 |
// Main JavaScript file for NanoMatter Technologies
|
| 3 |
|
| 4 |
document.addEventListener('DOMContentLoaded', function() {
|
| 5 |
// Initialize all components and animations
|
| 6 |
initScrollAnimations();
|
| 7 |
initFormHandling();
|
| 8 |
+
initMobileMenu();
|
| 9 |
});
|
| 10 |
|
| 11 |
function initScrollAnimations() {
|
|
|
|
| 58 |
}
|
| 59 |
}
|
| 60 |
|
| 61 |
+
function initMobileMenu() {
|
| 62 |
+
const navbar = document.querySelector('custom-navbar');
|
| 63 |
+
if (navbar) {
|
| 64 |
+
const mobileBtn = navbar.shadowRoot.querySelector('.mobile-menu-btn');
|
| 65 |
+
const navLinks = navbar.shadowRoot.querySelector('.nav-links');
|
| 66 |
+
|
| 67 |
+
if (mobileBtn && navLinks) {
|
| 68 |
+
mobileBtn.addEventListener('click', function() {
|
| 69 |
+
const isOpen = navLinks.style.display === 'flex';
|
| 70 |
+
navLinks.style.display = isOpen ? 'none' : 'flex';
|
| 71 |
+
});
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
// Smooth scrolling for anchor links
|
| 77 |
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 78 |
anchor.addEventListener('click', function (e) {
|
|
|
|
| 99 |
}
|
| 100 |
});
|
| 101 |
}
|
| 102 |
+
}
|