Homepage fixes and added file limit
Browse filesFiles changed (2)
1 unmodified line2345673 unmodified lines111213141516171811 unmodified lines303132333435361 unmodified lineimport FrameGrid from "../components/FrameGrid";export default function Analyze() {const [videoFile, setVideoFile] = useState(null);const [previewUrl, setPreviewUrl] = useState("");const [loading, setLoading] = useState(false);3 unmodified linesconst [isModalClosing, setIsModalClosing] = useState(false);const fileInputRef = useRef(null);const onFileChange = (e) => {const f = e.target.files?.[0];setVideoFile(f || null);};11 unmodified linese.preventDefault();e.stopPropagation();const f = e.dataTransfer.files?.[0];if (f && f.type.startsWith("video/")) setVideoFile(f);};const onDragOver = (e) => {1 unmodified line23456783 unmodified lines1213141516171819202122232425262711 unmodified lines3940414243444546474849505152531 unmodified lineimport FrameGrid from "../components/FrameGrid";export default function Analyze() {const MAX_FILE_BYTES = 15 * 1024 * 1024; // 15 MB capconst [videoFile, setVideoFile] = useState(null);const [previewUrl, setPreviewUrl] = useState("");const [loading, setLoading] = useState(false);3 unmodified linesconst [isModalClosing, setIsModalClosing] = useState(false);const fileInputRef = useRef(null);const isValidSize = (file) => file && file.size <= MAX_FILE_BYTES;const onFileChange = (e) => {const f = e.target.files?.[0];if (f && !isValidSize(f)) {setError("Video must be 15 MB or smaller.");setVideoFile(null);return;}setError("");setVideoFile(f || null);};11 unmodified linese.preventDefault();e.stopPropagation();const f = e.dataTransfer.files?.[0];if (f && f.type.startsWith("video/")) {if (!isValidSize(f)) {setError("Video must be 15 MB or smaller.");setVideoFile(null);return;}setError("");setVideoFile(f);}};const onDragOver = (e) => {
123456789102 unmodified lines13141516171811 unmodified lines303132333435363738394041424368 unmodified lines11211311411511611711833 unmodified lines152153154155156157158159160161162163164import Link from "next/link";import { useEffect, useState } from "react";const HERO_FRAMES = ["/1.jpg", "/2.jpg", "/3.jpg", "/4.jpg", "/5.jpg"];export default function Landing() {const [heroFrameIndex, setHeroFrameIndex] = useState(0);useEffect(() => {if (!HERO_FRAMES.length) return;2 unmodified lines}, 3500);return () => clearInterval(id);}, []);return (<div className="min-h-screen flex flex-col bg-slate-950 text-emerald-50 text-sm md:text-base bg-radial-fade animate-fade-in"><header className="border-b border-emerald-800/60 bg-slate-950/80 backdrop-blur">11 unmodified lines</div></header><main className="flex-1 space-y-10 md:space-y-12"><section className="relative overflow-hidden border-b border-emerald-900/60 animate-fade-in-up"><div className="absolute inset-0 pointer-events-none"><div className="absolute inset-0 opacity-20 bg-[radial-gradient(circle_at_top,_#22c55e33,_transparent_60%)]" /><div className="absolute inset-0 opacity-[0.07] bg-[linear-gradient(to_right,#10b981_10%,transparent_10%),linear-gradient(to_bottom,#10b981_10%,transparent_10%)] bg-[length:20px_20px]" /></div><div className="relative max-w-7xl mx-auto px-4 py-16 md:py-20 grid md:grid-cols-2 gap-10 items-center"><div className="space-y-5 animate-fade-in-scale"><p className="text-xs md:text-sm font-mono uppercase tracking-[0.35em] text-emerald-400/80">Real-time video forensics68 unmodified lines</div></section><section className="max-w-7xl mx-auto px-4 py-12 md:py-16 animate-fade-in-up"><div className="max-w-3xl"><h2 className="text-xl md:text-2xl font-semibold">How it works</h2></div>33 unmodified lines].map((step, idx) => (<divkey={step.title}className={`rounded-lg border bg-slate-950/80 p-3 flex flex-col gap-1 ${idx % 3 === 0? "border-emerald-700/60": idx % 3 === 1? "border-cyan-600/60": "border-fuchsia-600/60"}`}><div className="text-[10px] uppercase tracking-wide text-emerald-400/90">{step.title}</div><div className="font-semibold">{step.heading}</div>1234567891011122 unmodified lines151617181920212223242526272829303132333435363711 unmodified lines495051525354555657585960616268 unmodified lines13113213313413513613713813914014114233 unmodified lines176177178179180181182183184185186187188189import Link from "next/link";import { useEffect, useRef, useState } from "react";const HERO_FRAMES = ["/1.jpg", "/2.jpg", "/3.jpg", "/4.jpg", "/5.jpg"];export default function Landing() {const [heroFrameIndex, setHeroFrameIndex] = useState(0);const [howVisible, setHowVisible] = useState(false);const howRef = useRef(null);useEffect(() => {if (!HERO_FRAMES.length) return;2 unmodified lines}, 3500);return () => clearInterval(id);}, []);useEffect(() => {if (!howRef.current) return;const observer = new IntersectionObserver((entries) => {entries.forEach((entry) => {if (entry.isIntersecting) {setHowVisible(true);observer.unobserve(entry.target);}});},{ threshold: 0.2 });observer.observe(howRef.current);return () => observer.disconnect();}, []);return (<div className="min-h-screen flex flex-col bg-slate-950 text-emerald-50 text-sm md:text-base bg-radial-fade animate-fade-in"><header className="border-b border-emerald-800/60 bg-slate-950/80 backdrop-blur">11 unmodified lines</div></header><main className="flex-1"><section className="relative overflow-hidden border-b border-emerald-900/60 animate-fade-in-up min-h-[70vh] md:min-h-[80vh] pt-16 md:pt-24 pb-24 md:pb-32"><div className="absolute inset-0 pointer-events-none"><div className="absolute inset-0 opacity-20 bg-[radial-gradient(circle_at_top,_#22c55e33,_transparent_60%)]" /><div className="absolute inset-0 opacity-[0.07] bg-[linear-gradient(to_right,#10b981_10%,transparent_10%),linear-gradient(to_bottom,#10b981_10%,transparent_10%)] bg-[length:20px_20px]" /></div><div className="relative max-w-7xl mx-auto px-4 grid gap-12 lg:grid-cols-[1.15fr,0.85fr] items-start"><div className="space-y-5 animate-fade-in-scale"><p className="text-xs md:text-sm font-mono uppercase tracking-[0.35em] text-emerald-400/80">Real-time video forensics68 unmodified lines</div></section><sectionref={howRef}className={`max-w-7xl mx-auto px-4 py-12 md:py-16 -mt-10 md:-mt-14 transition-all duration-700 ${howVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"}`}><div className="max-w-3xl"><h2 className="text-xl md:text-2xl font-semibold">How it works</h2></div>33 unmodified lines].map((step, idx) => (<divkey={step.title}className={`rounded-lg border bg-slate-950/80 p-3 flex flex-col gap-1 transition-all duration-500 ${idx % 3 === 0? "border-emerald-700/60": idx % 3 === 1? "border-cyan-600/60": "border-fuchsia-600/60"} ${howVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4"}`}style={{ transitionDelay: howVisible ? `${idx * 80}ms` : "0ms" }}><div className="text-[10px] uppercase tracking-wide text-emerald-400/90">{step.title}</div><div className="font-semibold">{step.heading}</div>
frontend/pages/analyze.jsx+18-1
frontend/pages/index.jsx+32-7