Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ db.json
*.log
node_modules/
public/
.deploy*/
.deploy*/
.idea/
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.2.0"
"version": "3.2.2"
},
"dependencies": {
"hexo": "^3.2.0",
Expand All @@ -17,4 +17,4 @@
"hexo-renderer-stylus": "^0.3.1",
"hexo-server": "^0.2.0"
}
}
}
Binary file added source/img/scrollbar_arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion themes/huxblog/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# normal | night | night yilia | night eighties | night blue | night bright
# https://github.com/chriskempson/tomorrow-theme
# night yilia - https://github.com/litten/hexo-theme-yilia
highlight_theme: normal
highlight_theme: yilia
#code-font-family: 可以设置喜欢的代码字体
40 changes: 30 additions & 10 deletions themes/huxblog/source/css/highlight.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*https://github.com/chriskempson/tomorrow-theme*/

$highlight_theme = hexo-config("highlight_theme") || "normal"

$code-font-family = hexo-config("code-font-family") || "monospace"

if $highlight_theme == "normal"
$highlight-background = #f7f7f7
Expand Down Expand Up @@ -31,6 +31,20 @@ if $highlight_theme == "night"
$highlight-blue = #81a2be
$highlight-purple = #b294bb

if $highlight_theme == "yilia"
$highlight-background = #272822
$highlight-current-line = #393939
$highlight-selection = #4271ae
$highlight-foreground = #FFFFFF
$highlight-comment = #75715E
$highlight-red = #F92672
$highlight-orange = #f99157
$highlight-yellow = #E6DB74
$highlight-green = #A6E22E
$highlight-aqua = #66D9EF
$highlight-blue = #4271ae
$highlight-purple = #8959a8

if $highlight_theme == "night yilia"
$highlight-background = #4d4d4d
$highlight-current-line = #393939
Expand Down Expand Up @@ -103,7 +117,7 @@ article-padding = 20px
color-border = #ddd


$code-font-size = 13px
$code-font-size = 15px
$code-background = #eee
$code-foreground = #555
$code-border-radius = 4px
Expand All @@ -120,9 +134,9 @@ $code-block {
line-height: $line-height-code-block;
}

/*pre, code {
pre, code {
font-family: $code-font-family;
}*/
}

/*
.post-container code {
Expand Down Expand Up @@ -222,12 +236,14 @@ $code-block {
.params
.constant
.command {
color: $highlight-orange;
color: $highlight-green;
}

.ruby .class .title
.css .rules .attribute
.string
.string {
color: $highlight-yellow;
}
.value
.inheritance
.header
Expand All @@ -236,12 +252,12 @@ $code-block {
.special
.number
.formula {
color: $highlight-green;
color: $highlight-purple;
}

.title
.css .hexcolor {
color: $highlight-aqua;
color: $highlight-orange;
}

.function
Expand All @@ -256,8 +272,12 @@ $code-block {
}

.keyword
.meta
.preprocessor
.javascript .function {
color: $highlight-purple;
color: $highlight-aqua;
}

}
}

@import "scroll"
64 changes: 64 additions & 0 deletions themes/huxblog/source/css/scroll.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* 设置滚动条的样式 */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}

::-webkit-scrollbar-button {
width: 0;
height: 0;
}

::-webkit-scrollbar-button:start:increment,::-webkit-scrollbar-button:end:decrement {
display: none;
}

::-webkit-scrollbar-corner {
display: block;
}

::-webkit-scrollbar-thumb {
border-radius: 8px;
background-color: rgba(0,0,0,.2);
}

::-webkit-scrollbar-thumb:hover {
border-radius: 8px;
background-color: rgba(0,0,0,.5);
}

::-webkit-scrollbar-track,::-webkit-scrollbar-thumb {
border-right: 1px solid transparent;
border-left: 1px solid transparent;
}

::-webkit-scrollbar-track:hover {
background-color: rgba(0,0,0,.15);
}
::-webkit-scrollbar-button:start {
width: 10px;
height: 10px;
background: url(../img/scrollbar_arrow.png) no-repeat 0 0;
}

::-webkit-scrollbar-button:start:hover {
background: url(../img/scrollbar_arrow.png) no-repeat -15px 0;
}

::-webkit-scrollbar-button:start:active {
background: url(../img/scrollbar_arrow.png) no-repeat -30px 0;
}

::-webkit-scrollbar-button:end {
width: 10px;
height: 10px;
background: url(../img/scrollbar_arrow.png) no-repeat 0 -18px;
}

::-webkit-scrollbar-button:end:hover {
background: url(../img/scrollbar_arrow.png) no-repeat -15px -18px;
}

::-webkit-scrollbar-button:end:active {
background: url(../img/scrollbar_arrow.png) no-repeat -30px -18px;
}