'use client'; import { useEffect, useRef } from 'react'; import Navigation from '../../components/Navigation'; import FloatingLanguageSwitcher from '../../components/FloatingLanguageSwitcher'; import BlogShowcase from '../../components/BlogShowcase'; import Footer from '../../components/Footer'; import { Locale } from '../../lib/i18n'; import { getTranslations } from '../../lib/translations'; import { updateDocumentMeta } from '../../lib/seo-utils'; // Particle Background Component function ParticleBackground() { const canvasRef = useRef(null); useEffect(() => { const canvas = canvasRef.current; if (!canvas) return; const ctx = canvas.getContext('2d'); if (!ctx) return; // Set canvas size const resizeCanvas = () => { canvas.width = window.innerWidth; canvas.height = window.innerHeight; }; resizeCanvas(); window.addEventListener('resize', resizeCanvas); // Particle system const particles: Array<{ x: number; y: number; vx: number; vy: number; size: number; opacity: number; }> = []; // Create particles for (let i = 0; i < 100; i++) { particles.push({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, vx: (Math.random() - 0.5) * 0.5, vy: (Math.random() - 0.5) * 0.5, size: Math.random() * 3 + 1, opacity: Math.random() * 0.5 + 0.2, }); } // Animation loop const animate = () => { ctx.clearRect(0, 0, canvas.width, canvas.height); particles.forEach((particle) => { // Update position particle.x += particle.vx; particle.y += particle.vy; // Wrap around edges if (particle.x < 0) particle.x = canvas.width; if (particle.x > canvas.width) particle.x = 0; if (particle.y < 0) particle.y = canvas.height; if (particle.y > canvas.height) particle.y = 0; // Draw particle ctx.beginPath(); ctx.arc(particle.x, particle.y, particle.size, 0, Math.PI * 2); ctx.fillStyle = `rgba(255, 255, 255, ${particle.opacity})`; ctx.fill(); }); // Draw connections particles.forEach((particle, i) => { particles.slice(i + 1).forEach((otherParticle) => { const dx = particle.x - otherParticle.x; const dy = particle.y - otherParticle.y; const distance = Math.sqrt(dx * dx + dy * dy); if (distance < 100) { ctx.beginPath(); ctx.moveTo(particle.x, particle.y); ctx.lineTo(otherParticle.x, otherParticle.y); ctx.strokeStyle = `rgba(255, 255, 255, ${0.1 * (1 - distance / 100)})`; ctx.stroke(); } }); }); requestAnimationFrame(animate); }; animate(); return () => { window.removeEventListener('resize', resizeCanvas); }; }, []); return ( ); } export default function Page({ params }: { params: { locale: Locale } }) { const t = getTranslations(params.locale); // Update meta tags when locale changes useEffect(() => { updateDocumentMeta(params.locale); }, [params.locale]); return (
{/* Background Image with Overlay */}
')`, }} data-oid="t35j3uz" /> {/* Particle Background */} {/* Navigation */} {/* Floating Language Switcher */} {/* Hero Section */}

{t.hero.title}

{t.hero.subtitle}

{/* Blog Showcase Section */} {/* Floating Action Elements */}
{/* Footer */}
); }