Skip to content

Commit 7771bfd

Browse files
committed
docs: button color
1 parent d6e53da commit 7771bfd

File tree

2 files changed

+40
-32
lines changed

2 files changed

+40
-32
lines changed

.vitepress/theme/components/HeaderButton.vue

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121
<style scoped>
2222
.header-button {
2323
/* 按钮样式 */
24-
background-color: #000000;
25-
color: white;
26-
border: none;
24+
background-color: #ffffff;
25+
color: #374a52;
26+
border: 1px solid #e0e0e0;
2727
padding: 4px 12px;
2828
border-radius: 4px;
2929
cursor: pointer;
3030
margin-left: 10px; /* 与其他元素保持间距 */
3131
font-size: 14px;
32+
font-weight: 500;
3233
line-height: 1.5;
3334
height: 28px; /* 固定高度,避免占满header */
3435
display: flex; /* 改为flex以实现垂直居中 */
@@ -40,7 +41,8 @@
4041
}
4142
4243
.header-button:hover {
43-
background-color: #333333;
44+
background-color: #f2f2f2;
45+
color: #397b89;
4446
}
4547
4648
.button-icon {
@@ -50,11 +52,13 @@
5052
5153
/* 黑夜模式样式 */
5254
:root.dark .header-button {
53-
background-color: #dddddd;
54-
color: black;
55+
background-color: #2a2a2a;
56+
color: #e0e0e0;
57+
border: 1px solid #3a3a3a;
5558
}
5659
5760
:root.dark .header-button:hover {
58-
background-color: #e0e0e0;
61+
background-color: #3a3a3a;
62+
color: #48a8b5;
5963
}
6064
</style>

.vitepress/theme/components/HeaderButtonEN.vue

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,46 @@
2020
</script>
2121

2222
<style scoped>
23-
.header-button {
24-
/* 按钮样式 */
25-
background-color: #000000;
26-
color: white;
27-
border: none;
28-
padding: 4px 12px;
29-
border-radius: 4px;
30-
cursor: pointer;
31-
margin-left: 10px; /* 与其他元素保持间距 */
32-
font-size: 14px;
33-
line-height: 1.5;
34-
height: 28px; /* 固定高度,避免占满header */
35-
display: flex; /* 改为flex以实现垂直居中 */
36-
align-items: center; /* 垂直居中 */
37-
justify-content: center; /* 水平居中 */
38-
margin-top: auto; /* 自动上边距 */
39-
margin-bottom: auto; /* 自动下边距 */
40-
gap: 6px; /* 图标和文字之间的间距 */
41-
}
23+
.header-button {
24+
/* 按钮样式 */
25+
background-color: #ffffff;
26+
color: #374a52;
27+
border: 1px solid #e0e0e0;
28+
padding: 4px 12px;
29+
border-radius: 4px;
30+
cursor: pointer;
31+
margin-left: 10px; /* 与其他元素保持间距 */
32+
font-size: 14px;
33+
font-weight: 500;
34+
line-height: 1.5;
35+
height: 28px; /* 固定高度,避免占满header */
36+
display: flex; /* 改为flex以实现垂直居中 */
37+
align-items: center; /* 垂直居中 */
38+
justify-content: center; /* 水平居中 */
39+
margin-top: auto; /* 自动上边距 */
40+
margin-bottom: auto; /* 自动下边距 */
41+
gap: 6px; /* 图标和文字之间的间距 */
42+
}
4243
4344
.header-button:hover {
44-
background-color: #333333;
45+
background-color: #f2f2f2;
46+
color: #397b89;
4547
}
4648
4749
.button-icon {
4850
width: 14px;
4951
height: 14px;
5052
}
5153
52-
/* 黑夜模式样式 */
53-
:root.dark .header-button {
54-
background-color: #dddddd;
55-
color: black;
54+
/* 黑夜模式样式 */
55+
:root.dark .header-button {
56+
background-color: #2a2a2a;
57+
color: #e0e0e0;
58+
border: 1px solid #3a3a3a;
5659
}
5760
5861
:root.dark .header-button:hover {
59-
background-color: #e0e0e0;
62+
background-color: #3a3a3a;
63+
color: #48a8b5;
6064
}
6165
</style>

0 commit comments

Comments
 (0)