Skip to content

Commit 1fd4cb8

Browse files
committed
🎨docs: search right aligns
1. 搜索框右对齐 2. 官网按钮黑夜模式
1 parent f1ac356 commit 1fd4cb8

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.vitepress/theme/components/HeaderButton.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,14 @@
4747
width: 14px;
4848
height: 14px;
4949
}
50+
51+
/* 黑夜模式样式 */
52+
:root.dark .header-button {
53+
background-color: #dddddd;
54+
color: black;
55+
}
56+
57+
:root.dark .header-button:hover {
58+
background-color: #e0e0e0;
59+
}
5060
</style>

.vitepress/theme/components/HeaderButtonEN.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,14 @@
4848
width: 14px;
4949
height: 14px;
5050
}
51+
52+
/* 黑夜模式样式 */
53+
:root.dark .header-button {
54+
background-color: #dddddd;
55+
color: black;
56+
}
57+
58+
:root.dark .header-button:hover {
59+
background-color: #e0e0e0;
60+
}
5161
</style>

.vitepress/theme/custom.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@
2222

2323
.title {
2424
border-bottom: transparent !important;
25+
}
26+
27+
/* 调整搜索框位置 */
28+
div.VPNavBarSearch.search {
29+
padding: 0px;
30+
margin-left: auto;
31+
margin-right: 20px;
32+
flex-grow: 0;
2533
}

0 commit comments

Comments
 (0)