Static single-page marketing site with dark theme, 3-tier pricing, LLM/agent SEO (llms.txt), and deployment setup that overlays onto the existing WebsiteBox nginx via docker-compose.override.yml without modifying any core project files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
977 B
JavaScript
30 lines
977 B
JavaScript
// Mobile navigation toggle
|
|
const navToggle = document.querySelector('.nav-toggle');
|
|
const navLinks = document.querySelector('.nav-links');
|
|
|
|
if (navToggle && navLinks) {
|
|
navToggle.addEventListener('click', () => {
|
|
navLinks.classList.toggle('open');
|
|
});
|
|
|
|
// Close mobile nav when a link is clicked
|
|
navLinks.querySelectorAll('a').forEach(link => {
|
|
link.addEventListener('click', () => {
|
|
navLinks.classList.remove('open');
|
|
});
|
|
});
|
|
}
|
|
|
|
// Smooth scroll for anchor links (fallback for browsers without CSS scroll-behavior)
|
|
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
|
anchor.addEventListener('click', function (e) {
|
|
const href = this.getAttribute('href');
|
|
if (href.length <= 1) return;
|
|
const target = document.querySelector(href);
|
|
if (target) {
|
|
e.preventDefault();
|
|
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
}
|
|
});
|
|
});
|