@@ -107,7 +107,10 @@ export default function DeepSeekProject() {
107107 const content = await response . text ( ) ;
108108
109109 // Remove frontmatter if present
110- const contentWithoutFrontmatter = content . replace ( / ^ - - - \n [ \s \S ] * ?\n - - - \n / , '' ) ;
110+ let contentWithoutFrontmatter = content . replace ( / ^ - - - \n [ \s \S ] * ?\n - - - \n / , '' ) ;
111+
112+ // Remove image paths (markdown image syntax: )
113+ contentWithoutFrontmatter = contentWithoutFrontmatter . replace ( / ! \[ .* ?\] \( .* ?\) / g, '' ) ;
111114
112115 await navigator . clipboard . writeText ( contentWithoutFrontmatter ) ;
113116 setCopySuccess ( true ) ;
@@ -202,32 +205,26 @@ export default function DeepSeekProject() {
202205 { /* Article Container */ }
203206 < article className = "max-w-4xl mx-auto" >
204207 { /* Content Card */ }
205- < div className = "bg-white/5 backdrop-blur-xl border border-white/10 rounded-3xl shadow-2xl overflow-hidden " >
208+ < div className = "bg-white/5 backdrop-blur-xl border border-white/10 rounded-3xl shadow-2xl" >
206209 { /* Copy Article Button */ }
207210 < div className = "px-8 sm:px-12 pt-8 pb-4" >
208- < div className = "relative inline-block" >
211+ < div className = "relative inline-block group " >
209212 < button
210213 onClick = { handleCopyArticle }
211- className = { `group flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-all duration-300 ${
214+ className = { `flex items-center justify-center p-3 rounded-lg font-medium transition-all duration-300 ${
212215 copySuccess
213216 ? 'bg-green-500/20 text-green-400 border border-green-500/30'
214217 : 'bg-white/5 hover:bg-white/10 text-slate-300 hover:text-blue-400 border border-white/10 hover:border-blue-500/50'
215218 } `}
216219 >
217220 { copySuccess ? (
218- < >
219- < svg className = "w-4 h-4" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
220- < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M5 13l4 4L19 7" />
221- </ svg >
222- { language === 'en' ? 'Copied!' : '已复制!' }
223- </ >
221+ < svg className = "w-5 h-5" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
222+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M5 13l4 4L19 7" />
223+ </ svg >
224224 ) : (
225- < >
226- < svg className = "w-4 h-4 group-hover:scale-110 transition-transform" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
227- < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
228- </ svg >
229- { language === 'en' ? 'Copy Article' : '复制文章' }
230- </ >
225+ < svg className = "w-5 h-5 group-hover:scale-110 transition-transform" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
226+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
227+ </ svg >
231228 ) }
232229 </ button >
233230
0 commit comments