Skip to content

Commit 54dff21

Browse files
committed
feat: 优化项目模块细节
1 parent eead92b commit 54dff21

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

app/components/BlogArticles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export function BlogArticles({ title = '我的文章', subtitle = '来自博客
9292
}
9393

9494
return (
95-
<section id='article' className='py-20 bg-gray-50 relative overflow-hidden'>
95+
<section id='article' className='py-20 bg-white relative overflow-hidden'>
9696
<div className='max-w-7xl mx-auto px-4 relative z-10'>
9797
<h2 className='text-2xl sm:text-3xl md:text-4xl font-bold text-center mb-3 md:mb-4 px-4'>{title}</h2>
9898
<p className='text-gray-500 text-center mb-8 md:mb-12 text-sm md:text-base px-4'>{subtitle}</p>

app/components/NoteShowcase.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ export function NoteShowcase({
3434
{/* Left Column: Visual (Browser Frame) */}
3535
<div className='relative lg:col-span-7 order-last lg:order-first'>
3636
{/* Background Blob */}
37-
<div className='absolute -inset-4 bg-blue-100/50 rounded-xl -z-10 blur-2xl'></div>
37+
<div className='absolute -inset-4 bg-blue-200/50 rounded-3xl z-0 blur-2xl'></div>
3838

3939
{/* Browser Window */}
40-
<div className='bg-white rounded-3xl shadow-2xl overflow-hidden border border-gray-200/50'>
40+
<div className='bg-white rounded-3xl shadow-xl overflow-hidden border border-gray-200/50 relative z-1'>
4141
{/* Browser Header */}
4242
<div className='bg-gray-50 px-4 pt-4 flex items-center gap-2'>
4343
<div className='w-3 h-3 rounded-full bg-red-400'></div>
4444
<div className='w-3 h-3 rounded-full bg-yellow-400'></div>
4545
<div className='w-3 h-3 rounded-full bg-green-400'></div>
4646
{/* Address Bar Mockup */}
4747
<div className='ml-2 pl-2 flex-1 bg-white h-6 rounded-xl border border-gray-200/50 text-gray-400 text-sm truncate'>
48-
https://note.weizwz.com/
48+
{primaryButtonLink}
4949
</div>
5050
</div>
5151

5252
{/* Browser Content (Image) */}
53-
<div className='relative h-[400px] md:h-[500px] overflow-hidden bg-gray-50 group pt-2'>
53+
<div className='relative h-[400px] md:h-[500px] overflow-hidden bg-white group pt-1'>
5454
<img
5555
src="https://p.weizwz.com/siteshot_note.webp"
5656
alt="Blog Preview"
57-
className="w-full object-top transition-transform duration-700 group-hover:scale-[1.02]"
57+
className="w-full object-top transition-transform duration-800 group-hover:scale-[1.03]"
5858
/>
5959
{/* Inner Shadow */}
6060
<div className="absolute inset-0 pointer-events-none shadow-[inset_0_0_40px_rgba(0,0,0,0.05)]"></div>

app/components/ProjectShowcase.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Button } from 'antd'
2-
import { useEffect, useRef, useState } from 'react'
2+
import { useEffect, useRef, useState, useMemo } from 'react'
33

44
interface ProjectShowcaseProps {
55
title?: string
@@ -116,13 +116,13 @@ export function ProjectShowcase({
116116
];
117117

118118
// Create 5 columns with randomized images and durations
119-
const columns = Array.from({ length: 3 }).map((_, i) => {
119+
const columns = useMemo(() => Array.from({ length: 3 }).map((_, i) => {
120120
// Shuffle images and pick 10 random ones
121121
const shuffled = [...images].sort(() => Math.random() - 0.5).slice(0, 10);
122122
// Random duration between 40s and 80s
123123
const duration = 40 + Math.random() * 40;
124124
return { images: shuffled, duration };
125-
});
125+
}), []);
126126

127127
const techStack = ['Next.js', 'TailwindCSS', 'Iconify API', 'Unsplash API'];
128128

@@ -133,7 +133,7 @@ export function ProjectShowcase({
133133
{/* Left Column: Content */}
134134
<div className='text-left space-y-8 lg:col-span-6'>
135135
{/* Tag */}
136-
<div className='inline-flex items-center px-3 py-1 rounded-full bg-blue-50 text-blue-600 text-sm font-medium'>
136+
<div className='inline-flex items-center px-3 py-1 rounded-full bg-indigo-50 text-indigo-700 text-sm font-medium'>
137137
{subTitle}
138138
</div>
139139

@@ -183,10 +183,10 @@ export function ProjectShowcase({
183183
{/* Right Column: Browser Frame Visual */}
184184
<div className='relative lg:col-span-6'>
185185
{/* Background Blob */}
186-
<div className='absolute -inset-4 bg-blue-100/50 rounded-xl -z-10 blur-2xl'></div>
186+
<div className='absolute -inset-4 bg-indigo-200/50 rounded-3xl z-0 blur-2xl'></div>
187187

188188
{/* Browser Window */}
189-
<div className='bg-white rounded-3xl shadow-2xl overflow-hidden border border-gray-200/50'>
189+
<div className='bg-white rounded-3xl shadow-xl overflow-hidden border border-gray-200/50 relative z-1'>
190190
{/* Browser Header */}
191191
<div className='bg-gray-50 px-4 pt-4 flex items-center gap-2'>
192192
<div className='w-3 h-3 rounded-full bg-red-400'></div>

0 commit comments

Comments
 (0)