Replaced modal-based store links with direct links to the new store URL, removed all Printify references, and cleaned up associated modal HTML, CSS, and JavaScript. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f5797e65-2210-4d2e-bf70-278d8a0098c1 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: e8d67b34-b14e-4383-9ef2-7d299bff17e4 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2a2c58da-54a0-4c86-8ad0-3b93439f70de/f5797e65-2210-4d2e-bf70-278d8a0098c1/yrHiwv7 Replit-Helium-Checkpoint-Created: true
41 lines
2.2 KiB
JavaScript
41 lines
2.2 KiB
JavaScript
|
|
// Hamburger
|
|
const hamburger = document.getElementById('hamburger'), mobileMenu = document.getElementById('mobileMenu');
|
|
hamburger.addEventListener('click', function () { hamburger.classList.toggle('open'); mobileMenu.classList.toggle('open'); });
|
|
document.querySelectorAll('.mobile-nav-link').forEach(function (a) { a.addEventListener('click', function () { hamburger.classList.remove('open'); mobileMenu.classList.remove('open'); }); });
|
|
|
|
// Scroll reveal
|
|
const observer = new IntersectionObserver(function (entries) {
|
|
entries.forEach(function (e) { if (e.isIntersecting) { e.target.classList.add('visible'); observer.unobserve(e.target); } });
|
|
}, { threshold: 0.1 });
|
|
document.querySelectorAll('.reveal').forEach(function (el) { observer.observe(el); });
|
|
|
|
// Active nav
|
|
const secObs = new IntersectionObserver(function (entries) {
|
|
entries.forEach(function (e) { if (e.isIntersecting) { const id = e.target.id; document.querySelectorAll('.nav-links a[data-section]').forEach(function (a) { a.classList.toggle('active', a.dataset.section === id); }); } });
|
|
}, { rootMargin: '-40% 0px -55% 0px' });
|
|
['home', 'about', 'faq', 'contact'].forEach(function (id) { const el = document.getElementById(id); if (el) secObs.observe(el); });
|
|
|
|
// FAQ card accordion
|
|
document.querySelectorAll('.faq-card-q').forEach(function (btn) {
|
|
btn.addEventListener('click', function () {
|
|
const card = this.closest('.faq-card');
|
|
const isOpen = card.classList.contains('open');
|
|
document.querySelectorAll('.faq-card.open').forEach(function (c) { c.classList.remove('open'); });
|
|
if (!isOpen) card.classList.add('open');
|
|
});
|
|
});
|
|
|
|
// Contact form
|
|
document.getElementById('contactForm').addEventListener('submit', function (e) {
|
|
e.preventDefault();
|
|
const btn = this.querySelector('.form-submit');
|
|
btn.textContent = 'Message Sent ✓'; btn.style.background = 'var(--green)'; btn.style.borderColor = 'var(--green)'; btn.style.color = '#000';
|
|
setTimeout(function () { btn.textContent = 'Send It ↗'; btn.style.background = btn.style.borderColor = btn.style.color = ''; }, 3000);
|
|
});
|
|
|
|
// 3D cube float
|
|
const cube = document.getElementById('cube3d'); let t = 0;
|
|
function floatCube() { t += 0.012; cube.style.marginTop = (Math.sin(t) * 12) + 'px'; requestAnimationFrame(floatCube); }
|
|
floatCube();
|