11import { Button } from 'antd'
22import { config } from '../config'
3- import { useRef , useState } from 'react'
3+
4+ import { Section } from './common/Section'
5+ import { BrowserFrame } from './common/BrowserFrame'
6+ import { TechStack } from './common/TechStack'
47
58interface NoteShowcaseProps {
69 title ?: string
@@ -27,93 +30,74 @@ export function NoteShowcase({
2730 const techStack = [ 'VitePress' , 'Vue3' , 'ElementPlus' , 'Cloudflare' ] ;
2831
2932 return (
30- < section className = 'py-20 bg-gray-50' >
31- < div className = 'max-w-7xl mx-auto px-4 md:px-8' >
32- < div className = 'grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-20 items-center' >
33-
34- { /* Left Column: Visual (Browser Frame) */ }
35- < div className = 'relative lg:col-span-7 order-last lg:order-first' >
36- { /* Background Blob */ }
37- < div className = 'absolute -inset-4 bg-blue-200/50 rounded-3xl z-0 blur-2xl' > </ div >
38-
39- { /* Browser Window */ }
40- < div className = 'bg-white rounded-3xl shadow-xl overflow-hidden border border-gray-200/50 relative z-1' >
41- { /* Browser Header */ }
42- < div className = 'bg-gray-50 px-4 pt-4 flex items-center gap-2' >
43- < div className = 'w-3 h-3 rounded-full bg-red-400' > </ div >
44- < div className = 'w-3 h-3 rounded-full bg-yellow-400' > </ div >
45- < div className = 'w-3 h-3 rounded-full bg-green-400' > </ div >
46- { /* Address Bar Mockup */ }
47- < 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- { primaryButtonLink }
49- </ div >
50- </ div >
33+ < Section className = 'bg-gray-50' maxWidth = 'max-w-7xl' >
34+ < div className = 'grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-20 items-center' >
35+
36+ { /* Left Column: Visual (Browser Frame) */ }
37+ < div className = 'relative lg:col-span-7 order-last lg:order-first' >
38+ { /* Background Blob */ }
39+ < div className = 'absolute -inset-4 bg-blue-200/50 rounded-3xl z-0 blur-2xl' > </ div >
5140
52- { /* Browser Content (Image) */ }
53- < div className = 'relative h-[400px] md:h-[500px] overflow-hidden bg-white group pt-1' >
54- < img
55- src = "https://p.weizwz.com/siteshot_note.webp"
56- alt = "Blog Preview"
57- className = "w-full object-top transition-transform duration-800 group-hover:scale-[1.03]"
58- />
59- { /* Inner Shadow */ }
60- < div className = "absolute inset-0 pointer-events-none shadow-[inset_0_0_40px_rgba(0,0,0,0.05)]" > </ div >
61- </ div >
41+ { /* Browser Window */ }
42+ < BrowserFrame url = { primaryButtonLink } >
43+ { /* Browser Content (Image) */ }
44+ < div className = 'relative h-auto overflow-hidden bg-white group pt-1' >
45+ < img
46+ src = "https://p.weizwz.com/siteshot_note.webp"
47+ alt = "Blog Preview"
48+ className = "w-full object-top transition-transform duration-800 group-hover:scale-[1.03]"
49+ />
50+ { /* Inner Shadow */ }
51+ < div className = "absolute inset-0 pointer-events-none shadow-[inset_0_0_40px_rgba(0,0,0,0.05)]" > </ div >
6252 </ div >
63- </ div >
53+ </ BrowserFrame >
54+ </ div >
6455
65- { /* Right Column: Content */ }
66- < div className = 'text-left space-y-8 lg:col-span-5' >
67- { /* Tag */ }
68- < div className = 'inline-flex items-center px-3 py-1 rounded-full bg-blue-50 text-blue-600 text-sm font-medium' >
69- { subtitle }
70- </ div >
56+ { /* Right Column: Content */ }
57+ < div className = 'text-left space-y-8 lg:col-span-5' >
58+ { /* Tag */ }
59+ < div className = 'inline-flex items-center px-3 py-1 rounded-full bg-blue-50 text-blue-600 text-sm font-medium' >
60+ { subtitle }
61+ </ div >
7162
72- { /* Title */ }
73- < h2 className = 'text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 tracking-tight leading-tight' >
74- { title }
75- </ h2 >
63+ { /* Title */ }
64+ < h2 className = 'text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 tracking-tight leading-tight' >
65+ { title }
66+ </ h2 >
7667
77- { /* Description */ }
78- < p className = 'text-lg text-gray-600 leading-relaxed max-w-xl' >
79- { description }
80- </ p >
68+ { /* Description */ }
69+ < p className = 'text-lg text-gray-600 leading-relaxed max-w-xl' >
70+ { description }
71+ </ p >
8172
82- { /* Tech Stack */ }
83- < div className = 'flex flex-wrap gap-3' >
84- { techStack . map ( ( tech ) => (
85- < span key = { tech } className = 'px-4 py-2 bg-gray-100 text-gray-700 rounded-full text-sm font-medium' >
86- { tech }
87- </ span >
88- ) ) }
89- </ div >
73+ { /* Tech Stack */ }
74+ < TechStack items = { techStack } />
9075
91- { /* Buttons */ }
92- < div className = 'flex flex-wrap gap-4 pt-4' >
93- < Button
94- type = 'primary'
95- size = 'large'
96- shape = 'round'
97- href = { primaryButtonLink }
98- target = '_blank'
99- className = "w-full sm:w-auto"
100- >
101- { primaryButtonText }
102- </ Button >
103- < Button
104- size = 'large'
105- shape = 'round'
106- href = { secondaryButtonLink }
107- target = '_blank'
108- className = "w-full sm:w-auto"
109- >
110- { secondaryButtonText }
111- </ Button >
112- </ div >
76+ { /* Buttons */ }
77+ < div className = 'flex flex-wrap gap-4 pt-4' >
78+ < Button
79+ type = 'primary'
80+ size = 'large'
81+ shape = 'round'
82+ href = { primaryButtonLink }
83+ target = '_blank'
84+ className = "w-full sm:w-auto"
85+ >
86+ { primaryButtonText }
87+ </ Button >
88+ < Button
89+ size = 'large'
90+ shape = 'round'
91+ href = { secondaryButtonLink }
92+ target = '_blank'
93+ className = "w-full sm:w-auto"
94+ >
95+ { secondaryButtonText }
96+ </ Button >
11397 </ div >
114-
11598 </ div >
99+
116100 </ div >
117- </ section >
101+ </ Section >
118102 )
119103}
0 commit comments