"use client"; import Image from "next/image"; import { websites } from "../data/urls"; import Header from "@/components/header"; import Footer from "@/components/footer"; import { motion, useMotionTemplate, useMotionValue, useSpring, useTransform } from "framer-motion"; import { MouseEvent } from "react"; function SpotlightCard({ website, variants }: { website: any; variants: any }) { const mouseX = useMotionValue(0); const mouseY = useMotionValue(0); const x = useMotionValue(0); const y = useMotionValue(0); const rotateX = useSpring(useTransform(y, [-0.5, 0.5], ["2.5deg", "-2.5deg"]), { stiffness: 200, damping: 20 }); const rotateY = useSpring(useTransform(x, [-0.5, 0.5], ["-2.5deg", "2.5deg"]), { stiffness: 200, damping: 20 }); function handleMouseMove({ currentTarget, clientX, clientY }: MouseEvent) { const { left, top, width, height } = currentTarget.getBoundingClientRect(); mouseX.set(clientX - left); mouseY.set(clientY - top); x.set((clientX - left) / width - 0.5); y.set((clientY - top) / height - 0.5); } function handleMouseLeave() { x.set(0); y.set(0); } return (
{website.title}

{website.title}

{website.description}

); } export default function Home() { const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.08, delayChildren: 0.1, }, }, }; const itemVariants = { hidden: { y: 20, opacity: 0, scale: 0.98, filter: "blur(4px)" }, visible: { y: 0, opacity: 1, scale: 1, filter: "blur(0px)", transition: { type: "spring" as const, stiffness: 100, damping: 15, mass: 1 }, }, }; return (
{/* Hero Section */}

智能计算实验室

  在物理的世界里,粒子有形形色色的活法,有的粒子很轻,终生不为人所注意;有的粒子会一鸣惊人,在湮灭时释放出大量的光;有的粒子狡黠善变,一辈子不停地改变身份,时时刻刻要成为别的粒子;但有的粒子一生稳定,怀揣着出发时得到的巨大能量,一生孤独而平静地飞行,只活在自己的轨道里。

—— 李斐然《丁肇中 伟大的是物理》

{/* Grid Section */} {websites.map((website, index) => ( ))}
); }