add theme
This commit is contained in:
160
themes/butterfly/source/css/_mode/darkmode.styl
Normal file
160
themes/butterfly/source/css/_mode/darkmode.styl
Normal file
@@ -0,0 +1,160 @@
|
||||
if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
|
||||
[data-theme='dark']
|
||||
--global-bg: darken(#121212, 2)
|
||||
--font-color: alpha(#FFFFFF, .7)
|
||||
--hr-border: alpha(#FFFFFF, .4)
|
||||
--hr-before-color: alpha(#FFFFFF, .7)
|
||||
--search-bg: #121212
|
||||
--search-input-color: alpha(#FFFFFF, .7)
|
||||
--search-a-color: alpha(#FFFFFF, .7)
|
||||
--preloader-bg: darken(#121212, 2)
|
||||
--preloader-color: alpha(#FFFFFF, .7)
|
||||
--tab-border-color: #2c2c2c
|
||||
--tab-button-bg: #2c2c2c
|
||||
--tab-button-color: alpha(#FFFFFF, .7)
|
||||
--tab-button-hover-bg: lighten(#121212, 15)
|
||||
--tab-button-active-bg: #121212
|
||||
--card-bg: #121212
|
||||
--sidebar-bg: #121212
|
||||
--sidebar-menu-bg: lighten(#121212, 5)
|
||||
--btn-hover-color: lighten(#121212, 40)
|
||||
--btn-color: alpha(#FFFFFF, .7)
|
||||
--btn-bg: lighten(#121212, 5)
|
||||
--text-bg-hover: lighten(#121212, 15)
|
||||
--light-grey: alpha(#FFFFFF, .7)
|
||||
--dark-grey: alpha(#FFFFFF, .2)
|
||||
--white: alpha(#FFFFFF, .9)
|
||||
--text-highlight-color: alpha(#FFFFFF, .9)
|
||||
--blockquote-color: alpha(#FFFFFF, .7)
|
||||
--blockquote-bg: lighten(#121212, 10)
|
||||
--reward-pop: lighten(#121212, 10)
|
||||
--toc-link-color: alpha(#FFFFFF, .6)
|
||||
--scrollbar-color: lighten(#121212, 25)
|
||||
--timeline-bg: lighten(#121212, 5)
|
||||
--zoom-bg: #121212
|
||||
--mark-bg: alpha($dark-black, .6)
|
||||
|
||||
#web_bg:before
|
||||
position: absolute
|
||||
width: 100%
|
||||
height: 100%
|
||||
background-color: alpha($dark-black, .7)
|
||||
content: ''
|
||||
|
||||
.container
|
||||
code
|
||||
background: #2c2c2c
|
||||
|
||||
pre > code
|
||||
background: lighten(#121212, 2)
|
||||
|
||||
figure.highlight
|
||||
box-shadow: none
|
||||
|
||||
.note
|
||||
code
|
||||
background: $code-background
|
||||
|
||||
.aplayer
|
||||
filter: brightness(.8)
|
||||
|
||||
kbd
|
||||
border-color: #696969
|
||||
background-color: #525252
|
||||
color: #e2f1ff
|
||||
|
||||
// 頭部
|
||||
#page-header
|
||||
&.nav-fixed > #nav,
|
||||
&.not-top-img > #nav
|
||||
background: alpha(#121212, .8)
|
||||
box-shadow: 0 5px 6px -5px rgba(133, 133, 133, 0)
|
||||
|
||||
#post-comment
|
||||
.comment-switch
|
||||
if hexo-config('comments.text')
|
||||
background: #2c2c2c !important
|
||||
|
||||
#switch-btn
|
||||
filter: brightness(.8)
|
||||
|
||||
// note
|
||||
if hexo-config('note.style') == 'modern' || hexo-config('note.style') == 'flat'
|
||||
.note
|
||||
filter: brightness(.8)
|
||||
|
||||
// hide-tags
|
||||
.hide-button,
|
||||
.btn-beautify,
|
||||
.hl-label,
|
||||
#post-outdate-notice,
|
||||
.error-img,
|
||||
.container iframe,
|
||||
.gist,
|
||||
.ads-wrap
|
||||
filter: brightness(.8)
|
||||
|
||||
img
|
||||
if hexo-config('lazyload.enable') && hexo-config('lazyload.blur') && !hexo-config('lazyload.placeholder')
|
||||
filter: blur(0) brightness(.8)
|
||||
else
|
||||
filter: brightness(.8)
|
||||
|
||||
#aside-content .aside-list > .aside-list-item:not(:last-child)
|
||||
border-bottom: 1px dashed alpha(#FFFFFF, .1)
|
||||
|
||||
// Gitalk
|
||||
#gitalk-container
|
||||
filter: brightness(.8)
|
||||
|
||||
svg
|
||||
fill: alpha(#FFFFFF, .9) !important
|
||||
|
||||
// Disqusjs 反代模式下的適配
|
||||
#disqusjs
|
||||
#dsqjs
|
||||
&:hover,
|
||||
&:focus,
|
||||
.dsqjs-tab-active,
|
||||
.dsqjs-no-comment
|
||||
color: alpha(#FFFFFF, .7)
|
||||
|
||||
.dsqjs-order-label
|
||||
background-color: lighten(#121212, 5)
|
||||
|
||||
.dsqjs-post-body
|
||||
color: alpha(#FFFFFF, .7)
|
||||
|
||||
code,
|
||||
pre
|
||||
background: #2c2c2c
|
||||
|
||||
blockquote
|
||||
color: alpha(#FFFFFF, .7)
|
||||
|
||||
#artitalk_main #lazy
|
||||
background: #121212
|
||||
|
||||
#operare_artitalk .c2
|
||||
background: #121212
|
||||
|
||||
#card-toc
|
||||
+maxWidth900()
|
||||
background: lighten(#121212, 5)
|
||||
|
||||
// artalk
|
||||
.artalk.atk-dark-mode,
|
||||
.atk-layer-wrap.atk-dark-mode
|
||||
--at-color-font: alpha(#FFFFFF, .7)
|
||||
--at-color-meta: alpha(#FFFFFF, .7)
|
||||
--at-color-grey: alpha(#FFFFFF, .7)
|
||||
|
||||
.atk-send-btn,
|
||||
.atk-badge
|
||||
color: alpha(#FFFFFF, .7) !important
|
||||
|
||||
// waline
|
||||
#waline-wrap
|
||||
--waline-color: alpha(#FFFFFF, .7)
|
||||
--waline-dark-grey: alpha(#FFFFFF, .7)
|
||||
--waline-info-color: alpha(#FFFFFF, .5)
|
||||
185
themes/butterfly/source/css/_mode/readmode.styl
Normal file
185
themes/butterfly/source/css/_mode/readmode.styl
Normal file
@@ -0,0 +1,185 @@
|
||||
if hexo-config('readmode')
|
||||
.read-mode
|
||||
--font-color: #4c4948
|
||||
--readmode-light-color: #fff
|
||||
--white: #4c4948
|
||||
--light-grey: #4c4948
|
||||
--gray: #d6dbdf
|
||||
--hr-border: #d6dbdf
|
||||
--hr-before-color: darken(#d6dbdf, 10)
|
||||
--highlight-bg: #f7f7f7
|
||||
--exit-btn-bg: #C0C0C0
|
||||
--exit-btn-color: #fff
|
||||
--exit-btn-hover: darken(#C0C0C0, 20)
|
||||
--pseudo-hover: none
|
||||
|
||||
[data-theme='dark']
|
||||
.read-mode
|
||||
--font-color: rgba(255, 255, 255, .7)
|
||||
--readmode-light-color: #0d0d0d
|
||||
--white: rgba(255, 255, 255, .9)
|
||||
--light-grey: rgba(255, 255, 255, .7)
|
||||
--gray: rgba(255, 255, 255, .7)
|
||||
--hr-border: rgba(255, 255, 255, .5)
|
||||
--hr-before-color: rgba(255, 255, 255, .7)
|
||||
--highlight-bg: #171717
|
||||
--exit-btn-bg: #1f1f1f
|
||||
--exit-btn-color: rgba(255, 255, 255, .9)
|
||||
--exit-btn-hover: lighten(#1f1f1f, 20)
|
||||
|
||||
.read-mode
|
||||
background: var(--readmode-light-color)
|
||||
|
||||
.exit-readmode
|
||||
position: fixed
|
||||
top: 30px
|
||||
right: 30px
|
||||
z-index: 100
|
||||
width: 40px
|
||||
height: 40px
|
||||
background: var(--exit-btn-bg)
|
||||
color: var(--exit-btn-color)
|
||||
font-size: 16px
|
||||
transition: background .3s
|
||||
addBorderRadius(8)
|
||||
|
||||
+maxWidth768()
|
||||
top: initial
|
||||
bottom: 30px
|
||||
|
||||
&:hover
|
||||
background: var(--exit-btn-hover)
|
||||
|
||||
#aside-content
|
||||
display: none
|
||||
|
||||
#page-header.post-bg
|
||||
background: none !important
|
||||
|
||||
&:before
|
||||
opacity: 0
|
||||
|
||||
& > #post-info
|
||||
text-align: center
|
||||
|
||||
#post
|
||||
margin: 0 auto
|
||||
background: transparent
|
||||
box-shadow: none
|
||||
|
||||
&:hover
|
||||
box-shadow: none
|
||||
|
||||
& > canvas
|
||||
display: none !important
|
||||
|
||||
.highlight-tools,
|
||||
#footer,
|
||||
#post > *:not(#post-info):not(.post-content),
|
||||
#nav,
|
||||
#post-outdate-notice,
|
||||
#web_bg,
|
||||
#rightside,
|
||||
.not-top-img
|
||||
display: none !important
|
||||
|
||||
.container
|
||||
a
|
||||
color: #99a9bf
|
||||
|
||||
pre,
|
||||
.highlight:not(.js-file-line-container)
|
||||
background: var(--highlight-bg) !important
|
||||
|
||||
*
|
||||
color: var(--font-color) !important
|
||||
|
||||
figure.highlight
|
||||
border-radius: 0 !important
|
||||
box-shadow: none !important
|
||||
|
||||
& > :not(.highlight-tools)
|
||||
display: block !important
|
||||
|
||||
.line:before
|
||||
color: var(--font-color) !important
|
||||
|
||||
.hljs
|
||||
background: var(--highlight-bg) !important
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6
|
||||
padding: 0
|
||||
|
||||
&:before
|
||||
content: ''
|
||||
|
||||
&:hover
|
||||
padding: 0
|
||||
|
||||
ul,
|
||||
li,
|
||||
ol
|
||||
&:hover:before
|
||||
transform: none !important
|
||||
|
||||
ol,
|
||||
li
|
||||
&:before
|
||||
background: transparent !important
|
||||
color: var(--font-color) !important
|
||||
|
||||
ul
|
||||
>li
|
||||
&:before
|
||||
border-color: var(--gray) !important
|
||||
|
||||
.tabs
|
||||
border: 2px solid var(--tab-border-color)
|
||||
|
||||
> .nav-tabs
|
||||
background: transparent
|
||||
|
||||
> .tab
|
||||
border-top: none !important
|
||||
|
||||
> .tab-contents .tab-item-content.active
|
||||
animation: none
|
||||
|
||||
code
|
||||
color: var(--font-color)
|
||||
|
||||
blockquote
|
||||
border-color: var(--gray)
|
||||
background-color: var(--readmode-light-color)
|
||||
|
||||
kbd
|
||||
border: 1px solid var(--gray)
|
||||
background-color: transparent
|
||||
box-shadow: none
|
||||
color: var(--font-color)
|
||||
|
||||
.hide-toggle
|
||||
border: 1px solid var(--gray) !important
|
||||
|
||||
.hide-button,
|
||||
.btn-beautify,
|
||||
.hl-label
|
||||
border: 1px solid var(--gray) !important
|
||||
background: var(--readmode-light-color) !important
|
||||
color: var(--font-color) !important
|
||||
|
||||
.note
|
||||
border: 2px solid var(--gray)
|
||||
border-left-color: var(--gray) !important
|
||||
filter: none
|
||||
background-color: var(--readmode-light-color) !important
|
||||
color: var(--font-color)
|
||||
|
||||
&:before,
|
||||
.note-icon
|
||||
color: var(--font-color)
|
||||
Reference in New Issue
Block a user