Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
706b657c
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,发现更多精彩内容 >>
提交
706b657c
编写于
5月 15, 2015
作者:
A
afc163
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
code snipple
上级
c4023c81
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
68 addition
and
8 deletion
+68
-8
components/button/demo.md
components/button/demo.md
+0
-5
components/button/demo/basic.md
components/button/demo/basic.md
+9
-0
static/code.jsx
static/code.jsx
+27
-1
static/style.css
static/style.css
+19
-0
theme/templates/code.html
theme/templates/code.html
+5
-0
theme/templates/layout.html
theme/templates/layout.html
+5
-2
theme/theme.js
theme/theme.js
+3
-0
未找到文件。
components/button/demo.md
已删除
100644 → 0
浏览文件 @
c4023c81
# 基本型
---
<button></button>
components/button/demo/basic.md
0 → 100644
浏览文件 @
706b657c
# 基本型
-
description: 你说什么我听不清。
---
````
html
<button>
按钮
</button>
````
static/code.jsx
浏览文件 @
706b657c
/*jshint ignore:start */
var
CodeBox
=
React
.
createClass
({
getInitialState
:
function
()
{
return
{
html
:
''
};
},
componentDidMount
:
function
()
{
var
that
=
this
;
$
.
get
(
'
/
'
+
this
.
props
.
src
).
then
(
function
(
data
)
{
that
.
setState
({
html
:
data
});
});
},
render
:
function
()
{
return
<
pre
><
code
>
{
this
.
props
.
code
}
</
code
></
pre
>;
var
html
=
this
.
state
.
html
;
return
(
<
div
className
=
"code-box"
dangerouslySetInnerHTML
=
{
{
__html
:
html
}
}
></
div
>
);
}
});
var
CodeBoxes
=
React
.
createClass
({
render
:
function
()
{
return
(
<
div
className
=
"code-boxes"
>
{
this
.
props
.
children
}
</
div
>
);
}
});
static/style.css
浏览文件 @
706b657c
...
...
@@ -964,3 +964,22 @@ footer ul li > a {
margin-left
:
15px
;
font-weight
:
normal
;
}
.code-boxes
{
-webkit-column-count
:
2
;
-moz-column-count
:
2
;
column-count
:
2
;
-moz-column-gap
:
15px
;
-webkit-column-gap
:
15px
;
column-gap
:
15px
;
}
.code-box
{
border
:
1px
solid
#E9E9E9
;
border-radius
:
6px
;
padding
:
15px
;
}
.code-box
pre
code
{
border
:
none
;
}
theme/templates/code.html
0 → 100644
浏览文件 @
706b657c
<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>
theme/templates/layout.html
浏览文件 @
706b657c
...
...
@@ -89,11 +89,14 @@
{%- endif %}
</h1>
{{ post.html }}
<
CodeBox
code=
"code"
></CodeBox
>
<
h2>
组件演示
</h2
>
<div
id=
"code-boxes"
></div>
<script
type=
"text/jsx"
>
React
.
render
(
<
CodeBox
code
=
"
123
"
><
/CodeBox>
,
<
CodeBoxes
>
<
CodeBox
src
=
"
components/button/demo/basic.html
"
><
/CodeBox
>
<
CodeBox
src
=
"
components/button/demo/basic.html
"
><
/CodeBox
>
<
/CodeBoxes>
,
document
.
getElementById
(
'
code-boxes
'
)
);
</script>
...
...
theme/theme.js
浏览文件 @
706b657c
...
...
@@ -13,6 +13,9 @@ module.exports = function(nico) {
if
(
filepath
===
'
readme.md
'
)
{
post
.
filename
=
post
.
meta
.
filename
=
'
index
'
;
}
if
(
filepath
.
indexOf
(
'
/demo/
'
)
>
0
)
{
post
.
template
=
post
.
meta
.
template
=
'
code
'
;
}
return
post
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录