@@ -31,11 +31,12 @@ function BackToTop() {
3131 return (
3232 < button
3333 onClick = { scrollToTop }
34- className = "fixed bottom-6 right-6 z-50 flex items-center justify-center w-10 h-10 rounded-lg bg-[var(--bg-panel)] border border-[var(--border-subtle)] text-[var(--text-secondary)] hover:border-[var(--terminal-green)] hover:text-[var(--terminal-green)] hover:shadow-[0_0_15px_var(--terminal-green-glow)] transition-all duration-200 group "
34+ className = "fixed bottom-6 right-6 z-50 flex items-center justify-center w-10 h-10 rounded-lg bg-[var(--bg-panel)] border border-[var(--border-subtle)] text-[var(--text-secondary)] hover:border-[var(--terminal-green-dim )] hover:text-[var(--terminal-green)] transition-all duration-200 shadow-lg shadow-black/20 "
3535 title = "回到顶部"
36+ aria-label = "回到顶部"
3637 >
3738 < svg
38- className = "w-5 h-5 transition-transform group-hover:-translate-y-0.5"
39+ className = "w-4 h-4 transition-transform group-hover:-translate-y-0.5"
3940 fill = "none"
4041 stroke = "currentColor"
4142 viewBox = "0 0 24 24"
@@ -55,7 +56,6 @@ function ShareButtons({ activeSectionId }: { activeSectionId: string | null }) {
5556 setCopied ( type ) ;
5657 setTimeout ( ( ) => setCopied ( null ) , 2000 ) ;
5758 } catch {
58- // fallback for older browsers
5959 const textarea = document . createElement ( 'textarea' ) ;
6060 textarea . value = text ;
6161 document . body . appendChild ( textarea ) ;
@@ -82,41 +82,41 @@ function ShareButtons({ activeSectionId }: { activeSectionId: string | null }) {
8282 } , [ activeSectionId , copyToClipboard ] ) ;
8383
8484 return (
85- < div className = "flex items-center gap-2 mb-4 " >
85+ < div className = "flex items-center gap-2 mb-5 " >
8686 < button
8787 onClick = { copyPageLink }
88- className = "flex items-center gap-1.5 px-3 py-1.5 text-xs font-mono rounded-md bg-[var(--bg-panel)] border border-[var(--border-subtle)] text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:border-[var(--terminal-green-dim)] hover:text-[var(--terminal-green)] transition-all duration-200 "
88+ className = "flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md bg-[var(--bg-panel)] border border-[var(--border-subtle)] text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:border-[var(--terminal-green-dim)] hover:text-[var(--terminal-green)] transition-colors duration-150 "
8989 >
9090 { copied === 'page' ? (
9191 < >
92- < span className = "text-[var(--terminal-green)]" > ✓ </ span >
93- < span className = "text-[var(--terminal-green)]" > copied! </ span >
92+ < svg className = "w-3 h-3" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" > < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M5 13l4 4L19 7" /> </ svg >
93+ < span > 已复制 </ span >
9494 </ >
9595 ) : (
9696 < >
97- < span className = "opacity-60" > $ </ span >
98- < span > cp link </ span >
97+ < svg className = "w-3 h-3 opacity-50" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" > < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" /> </ svg >
98+ < span > 复制链接 </ span >
9999 </ >
100100 ) }
101101 </ button >
102102 < button
103103 onClick = { copySectionLink }
104104 disabled = { ! activeSectionId }
105- className = { `flex items-center gap-1.5 px-3 py-1.5 text-xs font-mono rounded-md border transition-all duration-200 ${
105+ className = { `flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md border transition-colors duration-150 ${
106106 activeSectionId
107107 ? 'bg-[var(--bg-panel)] border-[var(--border-subtle)] text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:border-[var(--amber-dim)] hover:text-[var(--amber)]'
108108 : 'bg-[var(--bg-void)] border-[var(--border-subtle)] text-[var(--text-muted)] cursor-not-allowed opacity-50'
109109 } `}
110110 >
111111 { copied === 'section' ? (
112112 < >
113- < span className = "text-[var(--terminal-green)]" > ✓ </ span >
114- < span className = "text-[var(--terminal-green)]" > copied! </ span >
113+ < svg className = "w-3 h-3" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" > < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M5 13l4 4L19 7" /> </ svg >
114+ < span > 已复制 </ span >
115115 </ >
116116 ) : (
117117 < >
118- < span className = "opacity-60 " > #</ span >
119- < span > cp section </ span >
118+ < span className = "opacity-40 font-mono " > #</ span >
119+ < span > 复制段落 </ span >
120120 </ >
121121 ) }
122122 </ button >
@@ -141,21 +141,15 @@ function PageOutline({
141141 if ( items . length === 0 ) return null ;
142142
143143 return (
144- < div className = "bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg p-4 mb-6 relative overflow-hidden" >
145- { /* Decorative corner accent */ }
146- < div className = "absolute top-0 left-0 w-16 h-16 opacity-20" >
147- < div className = "absolute top-0 left-0 w-full h-[1px] bg-gradient-to-r from-[var(--terminal-green)] to-transparent" />
148- < div className = "absolute top-0 left-0 w-[1px] h-full bg-gradient-to-b from-[var(--terminal-green)] to-transparent" />
149- </ div >
150-
151- < div className = "flex items-center justify-between gap-3 mb-4" >
152- < div className = "text-sm font-mono text-[var(--terminal-green)] flex items-center gap-2" >
153- < span className = "opacity-60" > ▸</ span >
154- < span > 目录索引</ span >
144+ < div className = "bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg p-4 mb-8" >
145+ < div className = "flex items-center justify-between gap-3 mb-3" >
146+ < div className = "text-xs font-medium text-[var(--text-secondary)] flex items-center gap-2" >
147+ < svg className = "w-3.5 h-3.5 opacity-50" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" > < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M4 6h16M4 12h16M4 18h7" /> </ svg >
148+ 目录
155149 </ div >
156- < div className = "text-xs text-[var(--text-muted)] font-mono" > // 点击跳转 </ div >
150+ < div className = "text-[10px] text-[var(--text-muted)]" > { items . length } 个章节 </ div >
157151 </ div >
158- < div className = "flex flex-wrap gap-2 " >
152+ < div className = "flex flex-wrap gap-1.5 " >
159153 { items . map ( ( s , index ) => (
160154 < a
161155 key = { s . id }
@@ -164,14 +158,13 @@ function PageOutline({
164158 e . preventDefault ( ) ;
165159 onSelectSection ( s . id ) ;
166160 } }
167- className = { `px-3 py-1.5 rounded-md text-sm font-mono border transition-all duration-200 ${
161+ className = { `px-2.5 py-1 rounded-md text-xs border transition-colors duration-150 ${
168162 activeSectionId === s . id
169- ? 'bg-[var(--terminal-green)]/10 border-[var(--terminal-green)]/40 text-[var(--terminal-green)] shadow-[0_0_10px_var(--terminal-green-glow )]'
163+ ? 'bg-[var(--terminal-green)]/8 border-[var(--terminal-green)]/30 text-[var(--terminal-green)]'
170164 : 'bg-[var(--bg-void)] border-[var(--border-subtle)] text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:border-[var(--border-default)] hover:text-[var(--text-primary)]'
171165 } `}
172- style = { { animationDelay : `${ index * 30 } ms` } }
173166 >
174- < span className = "opacity-50 mr-1" > { String ( index + 1 ) . padStart ( 2 , '0' ) } . </ span >
167+ < span className = "opacity-40 mr-1 font-mono text-[10px] " > { String ( index + 1 ) . padStart ( 2 , '0' ) } </ span >
175168 { s . title }
176169 </ a >
177170 ) ) }
@@ -247,33 +240,30 @@ export function PageLayout({
247240 { children }
248241
249242 { /* Navigation Footer */ }
250- < div className = "mt-12 pt-6 border-t border-[var(--border-subtle)]" >
243+ < div className = "mt-16 pt-6 border-t border-[var(--border-subtle)]" >
251244 < div className = "flex items-center justify-between gap-4" >
252245 < button
253246 disabled = { ! prev }
254247 onClick = { ( ) => prev && onNavigate ( prev . id ) }
255- className = { `group flex items-center gap-2 px-4 py-2.5 rounded-md text-sm font-mono border transition-all duration-200 ${
248+ className = { `group flex items-center gap-2 px-4 py-2.5 rounded-lg text-xs border transition-colors duration-150 ${
256249 prev
257250 ? 'bg-[var(--bg-panel)] border-[var(--border-subtle)] text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:border-[var(--cyber-blue-dim)] hover:text-[var(--cyber-blue)]'
258- : 'bg-[var(--bg-void)] border-[var(--border-subtle)] text-[var(--text-muted)] cursor-not-allowed opacity-50 '
251+ : 'bg-[var(--bg-void)] border-[var(--border-subtle)] text-[var(--text-muted)] cursor-not-allowed opacity-40 '
259252 } `}
260253 >
261254 < span className = { `transition-transform duration-200 ${ prev ? 'group-hover:-translate-x-1' : '' } ` } > ←</ span >
262- < span className = "max-w-[120px ] truncate" > { prev ? prev . label : 'EOF ' } </ span >
255+ < span className = "max-w-[140px ] truncate" > { prev ? prev . label : '— ' } </ span >
263256 </ button >
264- < div className = "text-xs text-[var(--text-muted)] font-mono hidden sm:block" >
265- // navigate
266- </ div >
267257 < button
268258 disabled = { ! next }
269259 onClick = { ( ) => next && onNavigate ( next . id ) }
270- className = { `group flex items-center gap-2 px-4 py-2.5 rounded-md text-sm font-mono border transition-all duration-200 ${
260+ className = { `group flex items-center gap-2 px-4 py-2.5 rounded-lg text-xs border transition-colors duration-150 ${
271261 next
272262 ? 'bg-[var(--bg-panel)] border-[var(--border-subtle)] text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:border-[var(--terminal-green-dim)] hover:text-[var(--terminal-green)]'
273- : 'bg-[var(--bg-void)] border-[var(--border-subtle)] text-[var(--text-muted)] cursor-not-allowed opacity-50 '
263+ : 'bg-[var(--bg-void)] border-[var(--border-subtle)] text-[var(--text-muted)] cursor-not-allowed opacity-40 '
274264 } `}
275265 >
276- < span className = "max-w-[120px ] truncate" > { next ? next . label : 'EOF ' } </ span >
266+ < span className = "max-w-[140px ] truncate" > { next ? next . label : '— ' } </ span >
277267 < span className = { `transition-transform duration-200 ${ next ? 'group-hover:translate-x-1' : '' } ` } > →</ span >
278268 </ button >
279269 </ div >
0 commit comments