🚀 feat: Dark Mode

This commit is contained in:
shenyu
2020-03-23 23:04:50 +08:00
parent c3588e1752
commit 1003d95815
10 changed files with 63 additions and 22 deletions

View File

@@ -55,11 +55,11 @@
&:hover
color sea
.to_top
.float_btns
position fixed
bottom 10rem
right 50px
z-index 9
z-index 9996
text-align center
transform scale(1.2)
@@ -89,5 +89,5 @@
#subtitle-box
font-size 2rem
.to_top
.float_btns
right 10px

View File

@@ -13,8 +13,7 @@
margin-left 50%
transform translateX(-50%)
box-shadow 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
-webkit-transition .4s ease-in-out
transition .4s ease-in-out
transition(.4s ease-in-out)
cursor pointer
&:hover,
&:active

View File

@@ -18,14 +18,21 @@
}
}
.totop
.totop,.todark
position relative
display inline-block
display block
overflow hidden
cursor pointer
rounded-circle(3.2rem)
background-color froth-light
background-color darken(froth-light,2%)
line-height 3rem
opacity .6
transition(opacity 1s ease)
&:hover
opacity 1
.totop
margin-bottom .8rem
&:hover > i {
animation rocket .3s ease-in-out
}
}

View File

@@ -32,16 +32,20 @@ body
&.darkmode
background: rgba(0,0,0,.6)
*
color darken(#fff,10%)
.ri-arrow-up-line
color #333 !important
.article-entry
code
background: darken(#999,20%)
.article-header .article-title,.share-outer i
color: darken(#fff,10%)
.article-entry code
background: darken(#ddd,10%) !important
color: #c7254e !important
.article-header .article-title,.share-outer i,.category-list .category-list-item i,.category-list a:hover .category-list-item,.article-date, .article-category .article-category-link, .archive-year-wrap .archive-year, .archive-article-date,a.toc-link,.tag-list > .tag-list-item:before,.article-tag-list:before
color: darken(#fff,10%) !important
.share-icons a i,#reward .reward-p,#reward .reward-p i
.share-icons a i,.float_btns i,#reward .reward-p,#reward .reward-p i,.local-search-input
color: darken(#999,20%) !important
.v *
color: #555 !important
.tag-list > .tag-list-item .tag-list-link,.article-tag-list .article-tag-list-link
background: darken(#fff,10%) !important
color: #555 !important
a
color link-color
&:hover