refactor: 清理无用资源并更新项目配置

删除大量未使用的图标、图片和组件文件
更新.gitignore、tsconfig.json和astro配置
添加新的工具函数和UI组件
修改项目元数据和依赖项
This commit is contained in:
joyzhao
2025-06-13 12:03:15 +08:00
parent 43d830aa27
commit c1bfb0915e
145 changed files with 1901 additions and 13996 deletions

View File

@@ -0,0 +1,41 @@
import React from "react";
import { motion } from "framer-motion";
import type { MotionProps } from "framer-motion";
interface MotionWrapperProps extends MotionProps {
children: React.ReactNode;
delay?: number;
}
// Default animations for sections
const defaultAnimations = {
hidden: { opacity: 0, y: 20 },
visible: (delay: number = 0) => ({
opacity: 1,
y: 0,
transition: {
duration: 0.6,
delay: delay,
ease: "easeOut",
},
}),
};
export default function MotionWrapper({
children,
delay = 0,
...props
}: MotionWrapperProps) {
return (
<motion.div
initial="hidden"
whileInView="visible"
viewport={{ once: true, margin: "-100px" }}
variants={defaultAnimations}
custom={delay}
{...props}
>
{children}
</motion.div>
);
}