Skip to content

Commit aedc4b4

Browse files
committed
feat(theme): align homepage colors with VitePress defaults and refine layout
- Update light/dark mode colors to match VitePress default theme - Move Dylan Thomas quote to hero section for prominence - Remove feature card icons for cleaner text-only design - Switch hero title to sans-serif font on single line - Sync dark mode navbar text colors
1 parent 602c367 commit aedc4b4

2 files changed

Lines changed: 48 additions & 63 deletions

File tree

docs/.vitepress/theme/components/HomePage.vue

Lines changed: 45 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
<section class="hero-section">
77
<div class="hero-content">
88
<h1 class="hero-title">
9-
<span class="hero-title-gradient">Coding Agent</span>
10-
<br />
11-
<span class="hero-title-gradient">for Research</span>
9+
<span class="hero-title-gradient">Coding Agent for Research</span>
1210
</h1>
1311
<p class="hero-tagline">Coding Agent 在学术研究中的应用经验分享</p>
12+
<blockquote class="hero-quote">
13+
<p><em>不要温和地走进那个良夜</em></p>
14+
<footer>-- 迪兰·托马斯(Dylan Thomas)</footer>
15+
</blockquote>
1416
<div class="hero-actions">
1517
<a class="hero-btn hero-btn-primary" href="/Agents-are-the-future-of-academic-research/posts/agent-basics/2026-02-13-llm-agent-basics">
1618
开始阅读
@@ -33,7 +35,6 @@
3335
:href="withBase(feature.link)"
3436
class="feature-card"
3537
>
36-
<span class="feature-icon">{{ feature.icon }}</span>
3738
<h3 class="feature-title">{{ feature.title }}</h3>
3839
<p class="feature-desc">{{ feature.details }}</p>
3940
</a>
@@ -44,11 +45,6 @@
4445
<!-- ===== Articles Section ===== -->
4546
<section class="articles-section">
4647
<div class="section-container">
47-
<blockquote class="articles-quote">
48-
<p><em>不要温和地走进那个良夜</em></p>
49-
<footer>-- 迪兰·托马斯(Dylan Thomas)</footer>
50-
</blockquote>
51-
5248
<h2 class="section-title">最新文章</h2>
5349
<div class="articles-list">
5450
<a
@@ -107,37 +103,31 @@ import CharacterCanvas from './CharacterCanvas.vue'
107103
108104
const features = [
109105
{
110-
icon: '\u{1F916}',
111106
title: 'Agent 基础',
112107
details: '深入理解 LLM Agent 的核心概念、架构原理和工作机制,为实践应用打下坚实基础',
113108
link: '/categories/agent-basics',
114109
},
115110
{
116-
icon: '\u{1F4BB}',
117111
title: 'Coding Agent 实践',
118112
details: 'Claude Code, OpenCode 等工具的深度使用技巧,提升编程效率的最佳实践',
119113
link: '/categories/coding-agent',
120114
},
121115
{
122-
icon: '\u{1F52C}',
123116
title: '学术科研案例',
124117
details: 'Coding Agent 在文献调研、数据分析、论文写作等学术场景中的真实应用案例',
125118
link: '/categories/research-cases',
126119
},
127120
{
128-
icon: '\u{1F6E0}\uFE0F',
129121
title: '工具对比评测',
130122
details: '主流 Coding Agent 工具的横向对比、性能评测和选型建议',
131123
link: '/categories/tools-comparison',
132124
},
133125
{
134-
icon: '\u{1F4A1}',
135126
title: '经验心得分享',
136127
details: '实践总结、踩坑记录、技巧分享,帮助你少走弯路',
137128
link: '/categories/insights',
138129
},
139130
{
140-
icon: '\u{1F680}',
141131
title: '我的常用 Skills',
142132
details: '集成 academic-research-writer, prompt-optimizer 等学术研究场景常用 Skills,全面提升学术写作效率',
143133
link: '/SKILLS-GUIDE',
@@ -166,13 +156,13 @@ const articles = [
166156
<style scoped>
167157
/* ===== Page-level unified background ===== */
168158
.home-page {
169-
/* Light mode page colors */
170-
--home-bg: #e8ecf4;
171-
--home-bg-soft: #d8dee8;
172-
--home-text-1: #1e293b;
173-
--home-text-2: rgba(30, 41, 59, 0.7);
174-
--home-text-3: rgba(30, 41, 59, 0.5);
175-
--home-divider: rgba(30, 41, 59, 0.1);
159+
/* Light mode page colors — matching VitePress defaults */
160+
--home-bg: #ffffff;
161+
--home-bg-soft: #f6f6f7;
162+
--home-text-1: rgba(60, 60, 67);
163+
--home-text-2: rgba(60, 60, 67, 0.78);
164+
--home-text-3: rgba(60, 60, 67, 0.56);
165+
--home-divider: rgba(60, 60, 67, 0.12);
176166
--home-brand-1: #3B82F6;
177167
178168
position: relative;
@@ -189,10 +179,10 @@ const articles = [
189179
justify-content: center;
190180
191181
/* Light mode hero specific */
192-
--hero-tagline: rgba(30, 41, 59, 0.6);
182+
--hero-tagline: rgba(60, 60, 67, 0.78);
193183
--hero-btn-secondary-bg: rgba(0, 0, 0, 0.04);
194-
--hero-btn-secondary-color: rgba(30, 41, 59, 0.7);
195-
--hero-btn-secondary-border: rgba(0, 0, 0, 0.1);
184+
--hero-btn-secondary-color: rgba(60, 60, 67, 0.78);
185+
--hero-btn-secondary-border: rgba(60, 60, 67, 0.12);
196186
--hero-btn-secondary-hover: rgba(0, 0, 0, 0.08);
197187
}
198188
@@ -206,7 +196,7 @@ const articles = [
206196
}
207197
208198
.hero-title {
209-
font-family: "Fira Code", "JetBrains Mono", "Consolas", monospace;
199+
font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
210200
font-size: 4rem;
211201
font-weight: 700;
212202
line-height: 1.2;
@@ -228,6 +218,26 @@ const articles = [
228218
font-weight: 400;
229219
}
230220
221+
.hero-quote {
222+
margin: 0 0 32px;
223+
padding: 0;
224+
border: none;
225+
background: none;
226+
text-align: center;
227+
}
228+
229+
.hero-quote p {
230+
margin: 0 0 4px;
231+
font-size: 1.1rem;
232+
color: var(--home-text-2);
233+
letter-spacing: 0.02em;
234+
}
235+
236+
.hero-quote footer {
237+
font-size: 0.85rem;
238+
color: var(--home-text-3);
239+
}
240+
231241
.hero-actions {
232242
display: flex;
233243
gap: 16px;
@@ -316,12 +326,6 @@ const articles = [
316326
box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
317327
}
318328
319-
.feature-icon {
320-
font-size: 2rem;
321-
display: block;
322-
margin-bottom: 16px;
323-
}
324-
325329
.feature-title {
326330
font-size: 1.1rem;
327331
font-weight: 600;
@@ -343,25 +347,6 @@ const articles = [
343347
padding: 0 0 80px;
344348
}
345349
346-
.articles-quote {
347-
border-left: 4px solid var(--home-brand-1);
348-
padding: 16px 24px;
349-
margin: 0 0 48px;
350-
background: var(--home-bg-soft);
351-
border-radius: 4px;
352-
}
353-
354-
.articles-quote p {
355-
margin: 0 0 4px;
356-
color: var(--home-text-2);
357-
font-size: 1rem;
358-
}
359-
360-
.articles-quote footer {
361-
color: var(--home-text-3);
362-
font-size: 0.875rem;
363-
}
364-
365350
.articles-list {
366351
display: flex;
367352
flex-direction: column;
@@ -516,20 +501,20 @@ const articles = [
516501
<!-- Non-scoped styles for dark mode (needs to target .dark on <html>) -->
517502
<style>
518503
.dark .home-page {
519-
--home-bg: #0f1020;
520-
--home-bg-soft: rgba(255, 255, 255, 0.04);
521-
--home-text-1: #F1F5F9;
522-
--home-text-2: rgba(241, 245, 249, 0.6);
523-
--home-text-3: rgba(241, 245, 249, 0.4);
524-
--home-divider: rgba(255, 255, 255, 0.08);
504+
--home-bg: #1b1b1f;
505+
--home-bg-soft: #202127;
506+
--home-text-1: rgba(255, 255, 245, 0.86);
507+
--home-text-2: rgba(235, 235, 245, 0.6);
508+
--home-text-3: rgba(235, 235, 245, 0.38);
509+
--home-divider: rgba(84, 84, 84, 0.48);
525510
--home-brand-1: #60A5FA;
526511
}
527512
528513
.dark .hero-section {
529-
--hero-tagline: rgba(241, 245, 249, 0.6);
514+
--hero-tagline: rgba(235, 235, 245, 0.6);
530515
--hero-btn-secondary-bg: rgba(255, 255, 255, 0.06);
531-
--hero-btn-secondary-color: rgba(241, 245, 249, 0.8);
532-
--hero-btn-secondary-border: rgba(255, 255, 255, 0.1);
516+
--hero-btn-secondary-color: rgba(255, 255, 245, 0.86);
517+
--hero-btn-secondary-border: rgba(84, 84, 84, 0.48);
533518
--hero-btn-secondary-hover: rgba(255, 255, 255, 0.1);
534519
}
535520

docs/.vitepress/theme/custom.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,15 @@
221221
border-color: rgba(255, 255, 255, 0.08) !important;
222222
}
223223

224-
/* 深色模式下导航栏文字在深色 Hero 上保持可见 */
224+
/* 深色模式下导航栏文字在透明背景上保持可见 */
225225
.dark:has(.home-page) .VPNavBar .VPNavBarTitle .title {
226-
color: rgba(241, 245, 249, 0.9) !important;
226+
color: rgba(255, 255, 245, 0.86) !important;
227227
}
228228

229229
/* 深色模式下导航栏链接颜色 */
230230
.dark:has(.home-page) .VPNavBar .VPNavBarMenu a,
231231
.dark:has(.home-page) .VPNavBar .VPNavBarMenu button {
232-
color: rgba(241, 245, 249, 0.8) !important;
232+
color: rgba(255, 255, 245, 0.86) !important;
233233
}
234234

235235
/* 主页不需要侧边栏和页脚 */

0 commit comments

Comments
 (0)