Skip to content

Commit cfc1497

Browse files
author
reco_luan
committed
fix: dark mode style
1 parent 3d93f97 commit cfc1497

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

components/Mode/ModePicker.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,17 @@ export default {
3333
const mode = localStorage.getItem('mode')
3434
const { mode: customizeMode } = this.$themeConfig
3535
this.currentMode = mode === null ? customizeMode === undefined ? 'auto' : customizeMode : mode
36-
if (customizeMode === null) {
37-
activateMode('light')
38-
} else if (mode === 'dark') {
39-
activateMode('dark')
40-
} else if (mode === 'light') {
41-
activateMode('light')
42-
}
36+
activateMode(this.currentMode)
4337
},
4438
4539
methods: {
4640
selectMode (mode) {
4741
if (mode.mode === this.currentMode) {
4842
return
49-
} else if (mode.mode === 'dark') {
50-
activateMode('dark')
51-
} else if (mode.mode === 'light') {
52-
activateMode('light')
5343
} else if (mode.mode === 'auto') {
5444
setMode()
45+
} else {
46+
activateMode(mode.mode)
5547
}
5648
localStorage.setItem('mode', mode.mode)
5749
this.currentMode = mode.mode

components/Mode/modeOptions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ const modeOptions = {
2929
'--default-color-3': 'rgba(0, 0, 0, .3)',
3030
'--default-color-2': 'rgba(0, 0, 0, .2)',
3131
'--default-color-1': 'rgba(0, 0, 0, .1)',
32-
'--background-color': '#25272a',
32+
'--background-color': '#202124',
3333
'--box-shadow': '0 1px 6px 0 rgba(0, 0, 0, .9)',
3434
'--box-shadow-hover': '0 2px 26px 0 rgba(0, 0, 0, .9)',
35-
'--text-color': '#aaa',
35+
'--text-color': '#fff',
3636
'--border-color': 'rgba(0, 0, 0, .3)',
3737
'--code-color': 'rgba(0, 0, 0, .3)',
3838
'--mask-color': '#000'

components/Page.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export default {
9191
9292
computed: {
9393
showAccessNumber () {
94-
console.log(this)
9594
return this.$themeConfig.commentsSolution === 'valine'
9695
},
9796
lastUpdated () {
@@ -232,14 +231,14 @@ function flatten (items, res) {
232231
.edit-link
233232
display inline-block
234233
a
235-
color lighten($textColor, 25%)
234+
color $accentColor
236235
margin-right 0.25rem
237236
.last-updated
238237
float right
239238
font-size 0.9em
240239
.prefix
241240
font-weight 500
242-
color lighten($textColor, 25%)
241+
color $accentColor
243242
.time
244243
font-weight 400
245244
color #aaa

styles/palette.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ $lineNumbersWrapperWidth = 2.5rem
2626
$textColorSub = #888
2727

2828
$backgroundColor ?= #fff
29-
$backgroundColorDark ?= #25272a
29+
$backgroundColorDark ?= #202124
3030

3131
$boxShadow = 0 1px 6px 0 $darkColor2
3232
$boxShadowHover = 0 2px 16px 0 $darkColor2
3333
$boxShadowDark = 0 1px 6px 0 $darkColor6
3434
$boxShadowHoverDark = 0 2px 16px 0 $darkColor6
3535

3636
$textColor ?= #2c3e50
37-
$textColorDark ?= #aaa
37+
$textColorDark ?= #fff
3838

3939
$borderColor ?= #eaecef
4040
$borderColorDark ?= $darkColor3

0 commit comments

Comments
 (0)