Permalink
Browse files

refactor: add 12 list styles 列表样式

  • Loading branch information...
MOxFIVE committed May 7, 2016
1 parent 41beb86 commit 06a840631f4586e3bdaa184bbaa674fa95aeffd3
Showing with 62 additions and 39 deletions.
  1. +3 −0 _config.yml
  2. +2 −38 source/css/_partial/article.styl
  3. +56 −0 source/css/_partial/customise/list.styl
  4. +1 −1 source/css/_partial/main.styl
View
@@ -124,6 +124,9 @@ blockquote_style:
blockquote: 1 # Value: 0 - 7 可选
# 自定义文章「引用部分」的样式
## List style type (ul) | 无序列表项标记样式
list_style: 0 # value: 0 - 12 可选
# 左边栏宽度 px
left_col_width: 300
@@ -153,45 +153,9 @@
margin: .85em auto;
line-height: 1.7;
}
li{
margin: 0.1em
font-size: 1rem;
}
em {
font-style: italic;
}
ul{
li:before{
display inline-block;
content: "";
width: .4em;
height: .4em;
margin-right: .5em;
margin-bottom: .11em;
border: 1px solid lightgray;
border-radius: 50%;
background: lightgray;
}
}
ul,ol{
font-size: 14px;
margin: 10px 0px;
}
li{
ul,ol{
margin-left: 30px;
li:before{
content: "";
background: #dedede;
}
}
}
li.task-list {
list-style: none;
&::before{
display: none;
}
}
h1{
margin-top: 30px;
}
@@ -286,6 +250,7 @@
white-space: nowrap;
}
}
@import "customise/list"
figure{
table {
border: none;
@@ -534,5 +499,4 @@ if hexo-config("toc_nowrap")
cursor: pointer;
}
}
}
}
@@ -0,0 +1,56 @@
list_style = hexo-config("list_style")
li
margin .1em
font-size 1rem
ul, ol
margin 10px 0
li.task-list
list-style none
margin-left 0
&::before
display none
li ul, li ol
margin-left 30px
if !list_style
ul > li:before
content ""
background #dedede
ul > li:before
display inline-block
content ""
width .4em
height .4em
margin-right .5em
margin-bottom .11em
border 1px solid #d3d3d3
border-radius 50%
background #d3d3d3
css-list = 1 disc, 2 circle, 3 square
for i in css-list
if list_style == i[0]
ul > li
margin-left 1.1em
list-style-type i[1]
icon-list = 4 f054, 5 f0a4, 6 f0fe,
7 f061, 8 f0a9, 9 f005,
10 f006, 11 f192, 12 f05b
for i in icon-list
if list_style == i[0]
ul > li
list-style none
margin 0
ul > li:before
content "\" + i[1]
font-family FontAwesome
font-size .8em
margin-right .5em
color #c8c8c8
@@ -378,7 +378,7 @@ if hexo-config("progressBar.on") && hexo-config("progressBar.type") == "minimal"
background #77b6ff
box-shadow 0 0 10px rgba(@background, .7)
.social,
.article-entry ul > li,
.share,
.article-category::before,
.article-tag::before,

1 comment on commit 06a8406

@MOxFIVE

This comment has been minimized.

Show comment
Hide comment
@MOxFIVE
Owner

MOxFIVE commented on 06a8406 May 7, 2016

#85

Please sign in to comment.