Skip to content

Commit

Permalink
style($blockquote): 7 alternatives 添加 7 个引用样式
Browse files Browse the repository at this point in the history
  • Loading branch information
MOxFIVE committed Jan 18, 2016
1 parent 1a4a282 commit 13127f5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 14 deletions.
7 changes: 6 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,18 @@ background_image: 5

highlight_style:
#on: true
inline_code: 1 # Value: 0 - 9 可用
inline_code: 1 # Value: 0 - 9 可选
code_block: 1 # Value: 0 - 4
# Set inline_code to style highlight text
# Chose a highlight theme for code block
# 通过 inline_code 切换内置文本高亮样式
# 通过 code_block 切换内置代码高亮配色主题

blockquote_style:
#on: true
blockquote: 1 # Value: 0 - 7 可选
# 自定义文章「引用部分」的样式

# 目录中标题不换行
# Keep TOC title on the same line |
toc_nowrap: false
Expand Down
15 changes: 2 additions & 13 deletions source/css/_partial/article.styl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
margin: -30px 0 20px 30px;
}
.article-entry{
line-height: 1.65em;
@require "customise/blockquote"
line-height: 1.65em;
padding:0 2em;
a:hover {
text-decoration: underline;
Expand All @@ -155,18 +156,6 @@ line-height: 1.65em;
margin: 0.1em
font-size: 1.1em;
}
blockquote {
padding: .4em 20px;
margin-top: 10px;
border-left: 4px solid rgba(147, 181, 224, .4);
background: rgba(255,255,255,0.4);
p{
margin-top: 0;
}
blockquote {
border-left: none;
}
}
em {
font-style: italic;
}
Expand Down
36 changes: 36 additions & 0 deletions source/css/_partial/customise/blockquote.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
blockquote
padding .4em 20px
margin-top 10px
border-left 4px solid rgba(147, 181, 224, .4)
background rgba(255,255,255,0.4)
p
margin-top 0
blockquote
border-left none

blockquote_style = hexo-config("blockquote_style.on")
blockquote = hexo-config("blockquote_style.blockquote")

if blockquote_style
if blockquote
border-left 5px solid rgba(112, 134, 142, .85)
background rgba(255, 255, 255, .7)
if blockquote == "2"
border-left 10px solid rgba(102,128,153,0.08)
background rgba(102,128,153,0.08)
if blockquote == "3"
border-left 5px solid rgba(255, 224, 112, .6)
background rgba(255, 244, 204, .6)
if blockquote == "4"
border-left 5px solid rgba(85, 138, 187, .8)
background rgba(255, 255, 255, .7)
if blockquote == "5"
border-left-color #ddd
background none
if blockquote == "6"
border-left 5px solid rgba(0, 153, 100, .62)
padding 10.5px 21px
background none
if blockquote == "7"
border-left 3px solid rgba(0,0,0,0.8)
background none

0 comments on commit 13127f5

Please sign in to comment.