scrollbar & valine

master
xaoxuu 4 years ago
parent 62a45acbc8
commit 91ecbcade2
  1. 27
      _config.yml
  2. 32
      source/css/_base/index.styl
  3. 7
      source/css/_defines/func.styl
  4. 15
      source/css/_highlight/index.styl
  5. 4
      source/css/_third-party/valine.styl
  6. 2
      source/js/valine.js

@ -13,6 +13,7 @@ style:
max_width: 1080px # Sum of body width and sidebar width (This limit will be exceeded when the device width is greater than 2000px, reaching 75% of the total width) max_width: 1080px # Sum of body width and sidebar width (This limit will be exceeded when the device width is greater than 2000px, reaching 75% of the total width)
scrollbar: scrollbar:
size: 8px size: 8px
border: 1px
color: '#2196f3' color: '#2196f3'
navbar: navbar:
height: 64px height: 64px
@ -69,19 +70,19 @@ style:
# url: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/Monaco/Monaco.ttf # url: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/Monaco/Monaco.ttf
# weight: normal # weight: normal
# style: normal # style: normal
color: # color:
site: '#21232F' # Website background color # site: '#21232F' # Website background color
site_inner: '#fff' # Text color inside the website background # site_inner: '#fff' # Text color inside the website background
card: '#444' # Card background color # card: '#444' # Card background color
text: '#fff' # The color of the text on the card. # text: '#fff' # The color of the text on the card.
theme: '#ff9800' # Main color # theme: '#ff9800' # Main color
link: '#1BCDFC' # Link color # link: '#1BCDFC' # Link color
hover: '#ff5722' # Link highlight color # hover: '#ff5722' # Link highlight color
inner: '#333' # Text color inside the button # inner: '#333' # Text color inside the button
block: '#555' # Block color # block: '#555' # Block color
inlinecode: yellow # Inline code color # inlinecode: yellow # Inline code color
codeblock: '#555' # Codeblock color # codeblock: '#555' # Codeblock color
p: '#ccc' # Paragraph color # p: '#ccc' # Paragraph color

@ -15,15 +15,12 @@ html
-ms-text-size-adjust: 100% -ms-text-size-adjust: 100%
text-rendering: optimizelegibility text-rendering: optimizelegibility
-webkit-tap-highlight-color: rgba(0, 0, 0, 0) -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
// > >
// ::-webkit-scrollbar if hexo-config('style.scrollbar.size')
// width: 8px if hexo-config('style.scrollbar.color')
// height: 8px scrollbar(convert(hexo-config('style.scrollbar.size')), convert(hexo-config('style.scrollbar.border')) || 0px, convert(hexo-config('style.scrollbar.color')))
// ::-webkit-scrollbar-thumb else
// background: $color-theme scrollbar(convert(hexo-config('style.scrollbar.size')), convert(hexo-config('style.scrollbar.border')) || 0px)
// border-radius: 2px
// ::-webkit-scrollbar-track
// background: transparent
body body
background-color: $color-site background-color: $color-site
@ -37,23 +34,6 @@ body
left: 0 left: 0
if hexo-config('style.scrollbar.size')
if hexo-config('style.scrollbar.color')
scrollbar(convert(hexo-config('style.scrollbar.size')), convert(hexo-config('style.scrollbar.color')))
else
scrollbar(convert(hexo-config('style.scrollbar.size')))
// *::-webkit-scrollbar
// height: 2px
// width: 8px
// *::-webkit-scrollbar-track-piece
// background: transparent
// *::-webkit-scrollbar-thumb
// background: alpha($color-text, .3)
// cursor: pointer
// trans()
// &:hover
// background: alpha($color-text, .6)
::-moz-selection { ::-moz-selection {
background: $color-selection background: $color-selection

@ -35,7 +35,7 @@ disable-user-select()
-webkit-user-select: none -webkit-user-select: none
user-select: none user-select: none
scrollbar($w = 4px, $c = mix($color-p, $color-card, 70)) scrollbar($w = 4px, $b = 2px, $c = mix($color-p, $color-card, 70))
&::-webkit-scrollbar &::-webkit-scrollbar
height: $w height: $w
width: $w width: $w
@ -44,7 +44,6 @@ scrollbar($w = 4px, $c = mix($color-p, $color-card, 70))
&::-webkit-scrollbar-thumb &::-webkit-scrollbar-thumb
background: alpha($c, .5) background: alpha($c, .5)
cursor: pointer cursor: pointer
border-radius: 2px border-radius: $b
trans()
&:hover &:hover
background: $c background: alpha($c, 1)

@ -22,6 +22,7 @@
>table >table
scrollbar()
overflow: auto overflow: auto
display: block display: block
td,th td,th
@ -115,20 +116,6 @@
content: "" content: ""
// &::-webkit-scrollbar
// height: $border-line
// width: $border-line
// &::-webkit-scrollbar-track-piece
// background: transparent
// &::-webkit-scrollbar-thumb
// background: alpha($color-text, .3)
// cursor: pointer
// border-radius: $border-codeblock
// trans()
// &:hover
// background: alpha($color-text, .6)
$hl-keyword = #9c27b0 $hl-keyword = #9c27b0

@ -105,6 +105,10 @@
border-left: none border-left: none
.vh .vh
border-bottom: 1px dashed alpha($color-text, .1) border-bottom: 1px dashed alpha($color-text, .1)
.vimg
border: 1px solid white
padding: 0
background: $color-codeblock
.vcontent.expand .vcontent.expand
&:before &:before
background: linear-gradient(180deg, alpha($color-card, .9), alpha($color-block, .9)); background: linear-gradient(180deg, alpha($color-card, .9), alpha($color-block, .9));

@ -970,7 +970,7 @@
header: [], header: [],
hr: [], hr: [],
i: [], i: [],
img: ["src", "alt", "title", "width", "height"], img: ["src", "id", "alt", "title", "width", "height"],
ins: ["datetime"], ins: ["datetime"],
li: [], li: [],
mark: [], mark: [],

Loading…
Cancel
Save