diff --git a/src/app/page.tsx b/src/app/page.tsx index 3aa8611..f51e507 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -140,14 +140,16 @@ export default function HomePage() { {/* Skills Section with animation */} - + {/**/} - + + + {/* Projects Section with enhanced visuals */} - + {/**/} 要看更多?

diff --git a/src/components/sections/personal-intro.tsx b/src/components/sections/personal-intro.tsx index 8e03931..718e587 100644 --- a/src/components/sections/personal-intro.tsx +++ b/src/components/sections/personal-intro.tsx @@ -8,6 +8,11 @@ import {TextPlugin} from "gsap/TextPlugin" import {Github, Mail, ExternalLink, Code, Heart, Coffee} from "lucide-react" import {Button} from "@/components/ui/button" import {useTheme} from "next-themes" +import dynamic from "next/dynamic"; + +const RandomItems = dynamic(() => (import('@/components/ui/random-items')), { + ssr: false, +}); export default function GsapPersonalIntro() { const containerRef = useRef(null) @@ -15,6 +20,16 @@ export default function GsapPersonalIntro() { const imageRef = useRef(null) const {theme, resolvedTheme} = useTheme() + const [isDark, setIsDark] = useState(false) + + useEffect(() => { + if (resolvedTheme === "dark") { + setIsDark(true) + } else { + setIsDark(false) + } + }, [resolvedTheme]); + const {scrollYProgress} = useScroll({ target: containerRef, offset: ["start start", "end start"], @@ -100,7 +115,7 @@ export default function GsapPersonalIntro() { // 确保清理所有 ScrollTrigger 实例 ScrollTrigger.getAll().forEach((trigger) => trigger.kill()); }; - }, [theme, resolvedTheme]); + }, [theme, resolvedTheme, isDark]); const words = ["全栈开发者", "设计者", "创造者"] const [currentWord, setCurrentWord] = useState(0) @@ -217,10 +232,10 @@ export default function GsapPersonalIntro() { grtsinry43 - {resolvedTheme === "dark" && ( + {isDark && (

)} @@ -236,17 +251,7 @@ export default function GsapPersonalIntro() { className="shape absolute -bottom-8 -left-8 w-16 h-16 rounded-full bg-gradient-to-br from-emerald-500 to-green-500 shadow-lg"/>
- {[...Array(10)].map((_, i) => ( -
- ))} +
diff --git a/src/components/sections/personality-section.tsx b/src/components/sections/personality-section.tsx index 92a8717..5bc13e9 100644 --- a/src/components/sections/personality-section.tsx +++ b/src/components/sections/personality-section.tsx @@ -67,7 +67,6 @@ export default function PersonalitySection() { return (
-
{/* Background elements */}
diff --git a/src/components/sections/project-showcase.tsx b/src/components/sections/project-showcase.tsx index 7511e9d..a090456 100644 --- a/src/components/sections/project-showcase.tsx +++ b/src/components/sections/project-showcase.tsx @@ -321,7 +321,8 @@ export default function GsapProjectsShowcase() {
{project.githubUrl && ( -