Files
zeekay e31297af5f Add zen-docs app for zenlm.org documentation
Integrate Zen LM documentation as 4th brand in the hanzo/docs monorepo.
16 model docs, getting-started, training, and datasets pages.
Cloudflare Pages deploy workflow at apps/zen-docs.
2026-02-14 07:16:44 -08:00

81 lines
2.2 KiB
JavaScript

// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
// Cards are visible immediately - no animation needed
// Navbar scroll effect
let lastScroll = 0;
const navbar = document.querySelector('header');
window.addEventListener('scroll', () => {
const currentScroll = window.pageYOffset;
if (currentScroll > 100) {
navbar.style.boxShadow = '0 4px 20px rgba(0, 0, 0, 0.3)';
} else {
navbar.style.boxShadow = 'none';
}
lastScroll = currentScroll;
});
// Add particle background effect (optional)
function createParticle() {
const particle = document.createElement('div');
particle.style.position = 'fixed';
particle.style.width = '2px';
particle.style.height = '2px';
particle.style.background = '#6366f1';
particle.style.borderRadius = '50%';
particle.style.pointerEvents = 'none';
particle.style.opacity = '0.5';
particle.style.left = Math.random() * window.innerWidth + 'px';
particle.style.top = Math.random() * window.innerHeight + 'px';
particle.style.animation = `float ${5 + Math.random() * 10}s linear infinite`;
document.body.appendChild(particle);
setTimeout(() => {
particle.remove();
}, 15000);
}
// Add float animation
const style = document.createElement('style');
style.textContent = `
@keyframes float {
0% {
transform: translateY(0) translateX(0);
opacity: 0;
}
10% {
opacity: 0.5;
}
90% {
opacity: 0.5;
}
100% {
transform: translateY(-100vh) translateX(${Math.random() * 100 - 50}px);
opacity: 0;
}
}
`;
document.head.appendChild(style);
// Create particles periodically
setInterval(createParticle, 500);
console.log('🌟 Zen LM - Next-Generation Language Models');
console.log('Built with clarity and purpose');