fix darkmode
This commit is contained in:
parent
7a742d61fe
commit
885c0f4dce
|
@ -5,6 +5,9 @@ if hexo-config('style.darkmode') == 'auto'
|
||||||
@media (prefers-color-scheme: dark)
|
@media (prefers-color-scheme: dark)
|
||||||
:root
|
:root
|
||||||
--blur-bg: alpha(black, .5)
|
--blur-bg: alpha(black, .5)
|
||||||
|
if hexo-config('style.darkmode') == 'always'
|
||||||
|
:root
|
||||||
|
--blur-bg: alpha(black, .5)
|
||||||
|
|
||||||
.blur
|
.blur
|
||||||
background: var(--blur-bg)
|
background: var(--blur-bg)
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
if hexo-config('style.darkmode') == 'auto'
|
if hexo-config('style.darkmode') == 'auto'
|
||||||
@media (prefers-color-scheme: dark)
|
@media (prefers-color-scheme: dark)
|
||||||
--blur-bg: alpha(#555, .6)
|
--blur-bg: alpha(#555, .6)
|
||||||
|
if hexo-config('style.darkmode') == 'always'
|
||||||
|
--blur-bg: alpha(#555, .6)
|
||||||
|
|
||||||
.sidebar-toggle.mobile
|
.sidebar-toggle.mobile
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
if hexo-config('style.darkmode') == 'auto'
|
if hexo-config('style.darkmode') == 'auto'
|
||||||
@media (prefers-color-scheme: dark)
|
@media (prefers-color-scheme: dark)
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
|
if hexo-config('style.darkmode') == 'always'
|
||||||
|
box-shadow: none
|
||||||
|
|
||||||
.proj-wrap
|
.proj-wrap
|
||||||
display: grid
|
display: grid
|
||||||
|
|
|
@ -47,8 +47,7 @@
|
||||||
--theme-bg: #444
|
--theme-bg: #444
|
||||||
color: var(--card) !important
|
color: var(--card) !important
|
||||||
|
|
||||||
if hexo-config('style.darkmode') == 'auto'
|
set_darkmode_tags()
|
||||||
@media (prefers-color-scheme: dark)
|
|
||||||
.tag-plugin[color='red']
|
.tag-plugin[color='red']
|
||||||
--theme-border: mix($c-red, $dark-card, 80)
|
--theme-border: mix($c-red, $dark-card, 80)
|
||||||
--theme-bg: mix($c-red, $dark-card, 10)
|
--theme-bg: mix($c-red, $dark-card, 10)
|
||||||
|
@ -77,7 +76,6 @@ if hexo-config('style.darkmode') == 'auto'
|
||||||
--theme-border: mix($c-purple, $dark-card, 80)
|
--theme-border: mix($c-purple, $dark-card, 80)
|
||||||
--theme-bg: mix($c-purple, $dark-card, 10)
|
--theme-bg: mix($c-purple, $dark-card, 10)
|
||||||
|
|
||||||
|
|
||||||
.tag-plugin[color='light']
|
.tag-plugin[color='light']
|
||||||
--theme-border: white
|
--theme-border: white
|
||||||
--theme-bg: #ddd
|
--theme-bg: #ddd
|
||||||
|
@ -87,3 +85,10 @@ if hexo-config('style.darkmode') == 'auto'
|
||||||
--theme-border: black
|
--theme-border: black
|
||||||
--theme-bg: #222
|
--theme-bg: #222
|
||||||
color: var(--text-p1) !important
|
color: var(--text-p1) !important
|
||||||
|
|
||||||
|
if hexo-config('style.darkmode') == 'auto'
|
||||||
|
@media (prefers-color-scheme: dark)
|
||||||
|
set_darkmode_tags()
|
||||||
|
|
||||||
|
if hexo-config('style.darkmode') == 'always'
|
||||||
|
set_darkmode_tags()
|
|
@ -106,10 +106,16 @@
|
||||||
.tk-comments-no
|
.tk-comments-no
|
||||||
color: var(--text-p1);
|
color: var(--text-p1);
|
||||||
|
|
||||||
if hexo-config('style.darkmode') == 'auto'
|
set_darkmode_comments()
|
||||||
@media (prefers-color-scheme: dark)
|
|
||||||
.cmt-body.twikoo
|
.cmt-body.twikoo
|
||||||
--twikoo-lighttext: #f2b94b;
|
--twikoo-lighttext: #f2b94b;
|
||||||
--twikoo-secondtext: #a1a2b8;
|
--twikoo-secondtext: #a1a2b8;
|
||||||
--twikoo-emoji-background: darken($dark-block, 1);
|
--twikoo-emoji-background: darken($dark-block, 1);
|
||||||
--twikoo-theme: #409eff;
|
--twikoo-theme: #409eff;
|
||||||
|
|
||||||
|
if hexo-config('style.darkmode') == 'auto'
|
||||||
|
@media (prefers-color-scheme: dark)
|
||||||
|
set_darkmode_comments()
|
||||||
|
|
||||||
|
if hexo-config('style.darkmode') == 'always'
|
||||||
|
set_darkmode_comments()
|
|
@ -49,12 +49,16 @@
|
||||||
if hexo-config('style.darkmode') == 'auto'
|
if hexo-config('style.darkmode') == 'auto'
|
||||||
@media (prefers-color-scheme: dark)
|
@media (prefers-color-scheme: dark)
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
|
if hexo-config('style.darkmode') == 'always'
|
||||||
|
box-shadow: none
|
||||||
&:active
|
&:active
|
||||||
background: linear-gradient(145deg, #eee, #fff)
|
background: linear-gradient(145deg, #eee, #fff)
|
||||||
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.1), -0px -0px 0px rgba(255, 255, 255, 0.8), inset 2px 2px 4px rgba(0, 0, 0, 0.1), inset -2px -2px 4px rgba(255, 255, 255, 1), inset -8px -8px 16px rgba(255, 255, 255, 0.4)
|
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.1), -0px -0px 0px rgba(255, 255, 255, 0.8), inset 2px 2px 4px rgba(0, 0, 0, 0.1), inset -2px -2px 4px rgba(255, 255, 255, 1), inset -8px -8px 16px rgba(255, 255, 255, 0.4)
|
||||||
if hexo-config('style.darkmode') == 'auto'
|
if hexo-config('style.darkmode') == 'auto'
|
||||||
@media (prefers-color-scheme: dark)
|
@media (prefers-color-scheme: dark)
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
|
if hexo-config('style.darkmode') == 'always'
|
||||||
|
box-shadow: none
|
||||||
.vedit
|
.vedit
|
||||||
.vctrl span
|
.vctrl span
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
Loading…
Reference in New Issue