Skip to content

Commit 72dbb20

Browse files
kevinten10claude
andcommitted
fix: 修复导航栏双搜索框、Logo重复文字、透明度问题
- 注释掉 gcs_engine_id,只保留 offlineSearch,消除双搜索框 - 移除 logo.svg 中的 "Capa" 文字,避免与 navbar-brand__name 重复 - 为首页添加毛玻璃导航栏样式,与深色 Hero 区域融合 - 导航栏搜索框适配暗色主题 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1349a3e commit 72dbb20

3 files changed

Lines changed: 68 additions & 12 deletions

File tree

assets/icons/logo.svg

Lines changed: 6 additions & 11 deletions
Loading

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ github_project_repo = "https://github.com/capa-cloud/capa"
158158
# github_branch= "main"
159159

160160
# Google Custom Search Engine ID. Remove or comment out to disable search.
161-
gcs_engine_id = "d72aa9b2712488cc3"
161+
# gcs_engine_id = "d72aa9b2712488cc3"
162162

163163
# Enable Algolia DocSearch
164164
algolia_docsearch = false

layouts/partials/hooks/head-end.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,67 @@
3838
-moz-osx-font-smoothing: grayscale;
3939
}
4040

41+
/* ---------- Navbar — glassmorphic over hero ---------- */
42+
body.td-home .td-navbar {
43+
background: rgba(8, 12, 31, 0.55) !important;
44+
backdrop-filter: blur(16px) saturate(1.4);
45+
-webkit-backdrop-filter: blur(16px) saturate(1.4);
46+
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
47+
box-shadow: 0 1px 24px rgba(0, 0, 0, 0.12);
48+
transition: background 0.3s ease, box-shadow 0.3s ease;
49+
}
50+
body.td-home .td-navbar .navbar-brand__name {
51+
font-family: var(--capa-font);
52+
font-weight: 800;
53+
font-size: 1.15rem;
54+
color: #fff !important;
55+
letter-spacing: -0.3px;
56+
}
57+
body.td-home .td-navbar .navbar-brand__logo svg {
58+
width: 24px;
59+
height: 24px;
60+
color: var(--capa-cyan);
61+
}
62+
body.td-home .td-navbar .nav-link {
63+
color: rgba(255, 255, 255, 0.7) !important;
64+
font-family: var(--capa-font);
65+
font-weight: 500;
66+
font-size: 0.88rem;
67+
transition: color 0.2s ease;
68+
}
69+
body.td-home .td-navbar .nav-link:hover,
70+
body.td-home .td-navbar .nav-link.active {
71+
color: #fff !important;
72+
}
73+
body.td-home .td-navbar .dropdown-toggle {
74+
color: rgba(255, 255, 255, 0.7) !important;
75+
}
76+
body.td-home .td-navbar .dropdown-toggle:hover {
77+
color: #fff !important;
78+
}
79+
/* Search box styling in navbar */
80+
body.td-home .td-navbar .td-search__input {
81+
background: rgba(255, 255, 255, 0.06) !important;
82+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
83+
color: rgba(255, 255, 255, 0.8) !important;
84+
border-radius: 8px;
85+
font-size: 0.82rem;
86+
font-family: var(--capa-font);
87+
transition: all 0.25s ease;
88+
}
89+
body.td-home .td-navbar .td-search__input::placeholder {
90+
color: rgba(255, 255, 255, 0.35);
91+
}
92+
body.td-home .td-navbar .td-search__input:focus {
93+
background: rgba(255, 255, 255, 0.1) !important;
94+
border-color: rgba(79, 108, 255, 0.4) !important;
95+
box-shadow: 0 0 0 3px rgba(79, 108, 255, 0.12);
96+
outline: none;
97+
}
98+
body.td-home .td-navbar .td-search__icon::before {
99+
color: rgba(255, 255, 255, 0.4);
100+
}
101+
41102
/* ---------- Scroll Reveal ---------- */
42103
.capa-reveal {
43104
opacity: 0;

0 commit comments

Comments
 (0)