fix: dark mode style
This commit is contained in:
parent
3d93f9792e
commit
cfc1497c12
@ -33,25 +33,17 @@ export default {
|
||||
const mode = localStorage.getItem('mode')
|
||||
const { mode: customizeMode } = this.$themeConfig
|
||||
this.currentMode = mode === null ? customizeMode === undefined ? 'auto' : customizeMode : mode
|
||||
if (customizeMode === null) {
|
||||
activateMode('light')
|
||||
} else if (mode === 'dark') {
|
||||
activateMode('dark')
|
||||
} else if (mode === 'light') {
|
||||
activateMode('light')
|
||||
}
|
||||
activateMode(this.currentMode)
|
||||
},
|
||||
|
||||
methods: {
|
||||
selectMode (mode) {
|
||||
if (mode.mode === this.currentMode) {
|
||||
return
|
||||
} else if (mode.mode === 'dark') {
|
||||
activateMode('dark')
|
||||
} else if (mode.mode === 'light') {
|
||||
activateMode('light')
|
||||
} else if (mode.mode === 'auto') {
|
||||
setMode()
|
||||
} else {
|
||||
activateMode(mode.mode)
|
||||
}
|
||||
localStorage.setItem('mode', mode.mode)
|
||||
this.currentMode = mode.mode
|
||||
|
@ -29,10 +29,10 @@ const modeOptions = {
|
||||
'--default-color-3': 'rgba(0, 0, 0, .3)',
|
||||
'--default-color-2': 'rgba(0, 0, 0, .2)',
|
||||
'--default-color-1': 'rgba(0, 0, 0, .1)',
|
||||
'--background-color': '#25272a',
|
||||
'--background-color': '#202124',
|
||||
'--box-shadow': '0 1px 6px 0 rgba(0, 0, 0, .9)',
|
||||
'--box-shadow-hover': '0 2px 26px 0 rgba(0, 0, 0, .9)',
|
||||
'--text-color': '#aaa',
|
||||
'--text-color': '#fff',
|
||||
'--border-color': 'rgba(0, 0, 0, .3)',
|
||||
'--code-color': 'rgba(0, 0, 0, .3)',
|
||||
'--mask-color': '#000'
|
||||
|
@ -91,7 +91,6 @@ export default {
|
||||
|
||||
computed: {
|
||||
showAccessNumber () {
|
||||
console.log(this)
|
||||
return this.$themeConfig.commentsSolution === 'valine'
|
||||
},
|
||||
lastUpdated () {
|
||||
@ -232,14 +231,14 @@ function flatten (items, res) {
|
||||
.edit-link
|
||||
display inline-block
|
||||
a
|
||||
color lighten($textColor, 25%)
|
||||
color $accentColor
|
||||
margin-right 0.25rem
|
||||
.last-updated
|
||||
float right
|
||||
font-size 0.9em
|
||||
.prefix
|
||||
font-weight 500
|
||||
color lighten($textColor, 25%)
|
||||
color $accentColor
|
||||
.time
|
||||
font-weight 400
|
||||
color #aaa
|
||||
|
@ -26,7 +26,7 @@ $lineNumbersWrapperWidth = 2.5rem
|
||||
$textColorSub = #888
|
||||
|
||||
$backgroundColor ?= #fff
|
||||
$backgroundColorDark ?= #25272a
|
||||
$backgroundColorDark ?= #202124
|
||||
|
||||
$boxShadow = 0 1px 6px 0 $darkColor2
|
||||
$boxShadowHover = 0 2px 16px 0 $darkColor2
|
||||
@ -34,7 +34,7 @@ $boxShadowDark = 0 1px 6px 0 $darkColor6
|
||||
$boxShadowHoverDark = 0 2px 16px 0 $darkColor6
|
||||
|
||||
$textColor ?= #2c3e50
|
||||
$textColorDark ?= #aaa
|
||||
$textColorDark ?= #fff
|
||||
|
||||
$borderColor ?= #eaecef
|
||||
$borderColorDark ?= $darkColor3
|
||||
|
Loading…
Reference in New Issue
Block a user