Skip to content

Commit 5faaf29

Browse files
committed
docs: override accent color of default theme
1 parent bcea9d5 commit 5faaf29

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

docs/.vuepress/styles/palette.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@require '../theme/styles/config'
2+
3+
$accentColor = saturation(lighten($c-basic, 25%), 40%)

docs/.vuepress/theme/layouts/Layout.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default {
104104
105105
body
106106
font 16px/1.42857 PingFang SC, Lantinghei SC, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif
107-
background-color #fbfcff
107+
background-color $c-bg
108108
109109
.navbar
110110
transition all 0.3s
@@ -122,7 +122,18 @@ body
122122
123123
.sidebar
124124
@media (min-width $mq-mobile)
125-
background #fbfcff
125+
width $s-sidebar-width * 0.82
126+
background $c-bg
127+
128+
@media (min-width $mq-narrow)
129+
width $s-sidebar-width
130+
131+
.page
132+
@media (min-width $mq-mobile)
133+
padding-left $s-sidebar-width * 0.82
134+
135+
@media (min-width $mq-narrow)
136+
padding-left $s-sidebar-width
126137
127138
.theme-container
128139
.previewer
@@ -265,6 +276,7 @@ body
265276
width 40px
266277
height 40px
267278
transform none
279+
268280
@media (max-width $mq-mobile)
269281
opacity 0
270282
visibility hidden

docs/.vuepress/theme/styles/config.styl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
* color config
33
*/
44

5-
$c-basic = #32495f;
6-
$c-basic-light = desaturate(lighten($c-basic, 35%), 10%);
5+
$c-basic = #32495f
6+
$c-basic-light = desaturate(lighten($c-basic, 35%), 10%)
7+
$c-bg = #fbfcff
78

89
/**
910
* size config
1011
*/
1112

12-
$s-home-divide-ratio = 36.5%;
13-
$s-home-middle-gap = 40px;
14-
$s-edge-gap = 30px;
15-
$s-header-height = 62px;
16-
$s-sidebar-width = 200px;
17-
$s-preview-width = 334px;
13+
$s-home-divide-ratio = 36.5%
14+
$s-home-middle-gap = 40px
15+
$s-edge-gap = 30px
16+
$s-header-height = 62px
17+
$s-preview-width = 334px
18+
$s-sidebar-width = 16.4rem
1819

1920
/**
2021
* responsive breakpoints

0 commit comments

Comments
 (0)