Spaces:
Running
Running
Here’s a single, self-contained build prompt you can paste into your code-gen AI to fully finish and ship the project on Hugging Face Spaces (Docker). It specifies architecture, endpoints, data models, parsers, UI, and deployment. Do not ask clarifying questions—assume reasonable defaults and complete everything end-to-end.
85f2806 verified | // Matrix rain effect | |
| function initMatrixRain() { | |
| const canvas = document.createElement('canvas'); | |
| const container = document.querySelector('.matrix-rain-overlay'); | |
| if (!container) return; | |
| container.appendChild(canvas); | |
| canvas.style.position = 'absolute'; | |
| canvas.style.top = '0'; | |
| canvas.style.left = '0'; | |
| canvas.style.width = '100%'; | |
| canvas.style.height = '100%'; | |
| canvas.style.opacity = '0.3'; | |
| canvas.style.zIndex = '1'; | |
| const ctx = canvas.getContext('2d'); | |
| canvas.width = container.offsetWidth; | |
| canvas.height = container.offsetHeight; | |
| const katakana = 'アァカサタナハマヤャラワガザダバパイィキシチニヒミリヰギジヂビピウゥクスツヌフムユュルグズブヅプエェケセテネヘメレヱゲゼデベペオォコソトノホモヨョロヲゴゾドボポヴッン'; | |
| const latin = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
| const nums = '0123456789'; | |
| const symbols = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'; | |
| const alphabet = katakana + latin + nums + symbols; | |
| const fontSize = 16; | |
| const columns = canvas.width / fontSize; | |
| const rainDrops = []; | |
| for (let x = 0; x < columns; x++) { | |
| rainDrops[x] = 1; | |
| } | |
| const draw = () => { | |
| ctx.fillStyle = 'rgba(8, 145, 178, 0.05)'; | |
| ctx.fillRect(0, 0, canvas.width, canvas.height); | |
| ctx.fillStyle = '#06b6d4'; | |
| ctx.font = fontSize + 'px monospace'; | |
| for (let i = 0; i < rainDrops.length; i++) { | |
| const text = alphabet.charAt(Math.floor(Math.random() * alphabet.length)); | |
| ctx.fillText(text, i * fontSize, rainDrops[i] * fontSize); | |
| if (rainDrops[i] * fontSize > canvas.height && Math.random() > 0.975) { | |
| rainDrops[i] = 0; | |
| } | |
| rainDrops[i]++; | |
| } | |
| }; | |
| setInterval(draw, 30); | |
| window.addEventListener('resize', () => { | |
| canvas.width = container.offsetWidth; | |
| canvas.height = container.offsetHeight; | |
| }); | |
| } | |
| document.addEventListener('DOMContentLoaded', () => { | |
| initMatrixRain(); | |
| // Animate elements when they come into view | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('animate-fadeIn'); | |
| } | |
| }); | |
| }, { threshold: 0.1 }); | |
| document.querySelectorAll('.feature-card, .hero-section').forEach(el => { | |
| observer.observe(el); | |
| }); | |
| }); |