Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
6ff3130f
A
ant-design
项目概览
wanjj_1210
/
ant-design
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6ff3130f
编写于
5月 15, 2015
作者:
A
afc163
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
layout
上级
706b657c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
111 addition
and
17 deletion
+111
-17
components/button/index.md
components/button/index.md
+14
-0
static/code.jsx
static/code.jsx
+12
-5
static/style.css
static/style.css
+74
-8
theme/templates/code.html
theme/templates/code.html
+7
-2
theme/templates/layout.html
theme/templates/layout.html
+4
-2
未找到文件。
components/button/index.md
浏览文件 @
6ff3130f
...
...
@@ -5,3 +5,17 @@
---
这是一个按钮。
## 什么时候使用
的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束。
的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束,的凯撒垃圾分类快结束。
## 为什么使用
的凯撒垃圾分类的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束。
的凯撒垃圾分类快结束的凯撒垃圾分类快结束的凯撒垃圾分类快结束,的凯撒垃圾分类快结束。
static/code.jsx
浏览文件 @
6ff3130f
...
...
@@ -6,17 +6,24 @@ var CodeBox = React.createClass({
};
},
componentDidMount
:
function
()
{
var
that
=
this
;
$
.
get
(
'
/
'
+
this
.
props
.
src
).
then
(
function
(
data
)
{
that
.
setState
({
html
:
data
var
item
=
$
(
data
);
item
.
find
(
'
.highlight
'
).
appendTo
(
item
);
this
.
setState
({
html
:
item
.
html
()
});
});
}.
bind
(
this
));
},
handleClick
:
function
(
e
)
{
if
(
!
$
(
e
.
target
).
hasClass
(
'
collapse
'
))
{
return
;
}
$
(
e
.
target
).
parent
().
parent
().
find
(
'
.highlight
'
).
toggle
();
},
render
:
function
()
{
var
html
=
this
.
state
.
html
;
return
(
<
div
className
=
"code-box"
dangerouslySetInnerHTML
=
{
{
__html
:
html
}
}
></
div
>
<
div
className
=
"code-box"
onClick
=
{
this
.
handleClick
}
dangerouslySetInnerHTML
=
{
{
__html
:
html
}
}
></
div
>
);
}
});
...
...
static/style.css
浏览文件 @
6ff3130f
...
...
@@ -3,8 +3,7 @@ html {
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
}
html
,
body
{
html
,
body
{
height
:
100%
;
}
body
{
...
...
@@ -303,6 +302,8 @@ footer {
clear
:
both
;
border-top
:
1px
solid
#eee
;
font-size
:
16px
;
position
:
relative
;
background
:
#fff
;
}
footer
ul
{
overflow
:
hidden
;
...
...
@@ -340,10 +341,7 @@ footer ul li > a {
}
.aside-container
{
width
:
240px
;
float
:
left
;
height
:
100%
;
background
:
#F9F9F9
;
position
:
absolute
;
padding-top
:
15px
;
}
...
...
@@ -375,13 +373,15 @@ footer ul li > a {
color
:
#71B5DE
;
}
.main-wrapper
{
display
:
flex
;
}
.main-container
{
width
:
calc
(
100%
-
240px
);
float
:
right
;
padding
:
30px
40px
;
-webkit-animation
:
xRightMatrix
.5s
ease-out
.5s
backwards
;
animation
:
xRightMatrix
.5s
ease-out
.5s
backwards
;
height
:
100%
;
}
.main-container-center
{
...
...
@@ -400,8 +400,13 @@ footer ul li > a {
color
:
#5C6B77
;
}
.markdown
h2
{
margin
:
2.5em
0
1em
0
;
}
.markdown
p
{
margin
:
1em
0
;
width
:
75%
;
}
@media
only
screen
and
(
min-width
:
768px
)
and
(
max-width
:
1024px
)
{
...
...
@@ -977,7 +982,68 @@ footer ul li > a {
.code-box
{
border
:
1px
solid
#E9E9E9
;
border-radius
:
6px
;
padding
:
15px
;
display
:
inline-block
;
width
:
100%
;
}
.code-box
.nico-insert-code
{
padding
:
50px
25px
;
border-bottom
:
1px
solid
#ddd
;
}
.code-box-meta
{
position
:
relative
;
padding
:
25px
15px
;
}
.code-box-meta
h4
,
.code-box-meta
p
{
margin
:
0
;
}
.code-box-title
{
position
:
absolute
;
top
:
-10px
;
background
:
#fff
;
padding
:
0
1em
;
color
:
#999
;
font-weight
:
bold
;
}
.code-box-description
{
font-size
:
12px
;
}
.code-box
.collapse
{
position
:
absolute
;
right
:
15px
;
top
:
50%
;
cursor
:
pointer
;
border
:
1px
solid
#999
;
width
:
20px
;
height
:
20px
;
line-height
:
17px
;
font-size
:
14px
;
text-indent
:
3px
;
border-radius
:
100%
;
opacity
:
0.5
;
transform
:
rotate
(
90deg
);
margin-top
:
-10px
;
}
.code-box
.collapse
:hover
{
opacity
:
1
;
}
.code-box
.highlight
{
overflow
:
hidden
;
display
:
none
;
border-top
:
1px
dashed
#ddd
;
padding
:
5px
15px
;
}
.code-box
pre
{
margin
:
0
;
}
.code-box
pre
code
{
...
...
theme/templates/code.html
浏览文件 @
6ff3130f
<div
class=
"code-box-container"
>
{{ post.html }}
<h4
class=
"code-box-title"
>
{{ post.title }}
</h4>
<p
class=
"code-box-description"
>
{{ post.meta.description }}
</p>
<div
class=
"code-box-meta"
>
<div
class=
"code-box-title"
>
{{ post.title }}
</div>
<p
class=
"code-box-description"
>
{{ post.meta.description }}
</p>
<span
class=
"collapse iconfont icon-chevron"
></span>
</div>
</div>
theme/templates/layout.html
浏览文件 @
6ff3130f
...
...
@@ -72,6 +72,7 @@
</div>
<script
src=
"/static/home.js"
></script>
{%- else %}
<div
class=
"main-wrapper"
>
{%- if post.meta.template === 'component' %}
{%- include "aside.html" %}
<section
class=
"main-container"
>
...
...
@@ -100,8 +101,9 @@
document
.
getElementById
(
'
code-boxes
'
)
);
</script>
</article>
</section>
</article>
</section>
</div>
{%- endif %}
<footer
id=
"footer"
>
<ul>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录