Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zui
提交
cc66021e
Z
zui
项目概览
易企天创
/
zui
大约 1 年 前同步成功
通知
6
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
37
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
37
Issue
37
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cc66021e
编写于
4月 18, 2015
作者:
C
Catouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* change document UI.
上级
2479b17b
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
110 addition
and
22 deletion
+110
-22
docs/2/css/doc.css
docs/2/css/doc.css
+14
-2
docs/2/css/doc.css.map
docs/2/css/doc.css.map
+1
-1
docs/2/css/doc.min.css
docs/2/css/doc.min.css
+2
-2
docs/2/index.html
docs/2/index.html
+3
-2
src/js/doc.js
src/js/doc.js
+73
-14
src/less/doc.less
src/less/doc.less
+17
-1
未找到文件。
docs/2/css/doc.css
浏览文件 @
cc66021e
/*!
* ZUI - v1.2.1 - 2015-04-1
7
* ZUI - v1.2.1 - 2015-04-1
8
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2015 cnezsoft.com; Licensed MIT
...
...
@@ -481,6 +481,9 @@ body {
-o-transition
:
all
.1s
cubic-bezier
(
.175
,
.885
,
.32
,
1
);
transition
:
all
.1s
cubic-bezier
(
.175
,
.885
,
.32
,
1
);
}
#grid
.card-heading
>
h5
>
a
.name
{
color
:
#353535
;
}
#grid
.card-heading
>
small
{
position
:
relative
;
display
:
block
;
...
...
@@ -1047,7 +1050,7 @@ body.input-query-focus #grid .card.choosed:before {
}
#page
{
position
:
relative
;
background-color
:
#fff
;
background-color
:
rgba
(
255
,
255
,
255
,
.8
)
;
-webkit-box-shadow
:
0
4px
10px
rgba
(
0
,
0
,
0
,
.25
),
0
120px
220px
#f1f1f1
;
box-shadow
:
0
4px
10px
rgba
(
0
,
0
,
0
,
.25
),
0
120px
220px
#f1f1f1
;
}
...
...
@@ -1099,6 +1102,14 @@ body.input-query-focus #grid .card.choosed:before {
-o-transition
:
all
.3s
cubic-bezier
(
.175
,
.885
,
.32
,
1
);
transition
:
all
.3s
cubic-bezier
(
.175
,
.885
,
.32
,
1
);
}
#pageHeader
>
.wrapper
>
h2
>
a
.name
{
color
:
#353535
;
}
#pageHeader
>
.wrapper
>
h2
>
a
.name
:hover
{
color
:
#353535
;
text-decoration
:
none
;
cursor
:
normal
;
}
#pageHeader
>
.path-btn
{
position
:
absolute
;
top
:
0
;
...
...
@@ -1267,6 +1278,7 @@ body.page-show.page-show-in #page {
left
:
0
!important
;
width
:
100%
!important
;
max-height
:
none
!important
;
background-color
:
#fff
;
opacity
:
1
;
}
body
.page-show.page-show-in
#pageHeader
{
...
...
docs/2/css/doc.css.map
浏览文件 @
cc66021e
此差异已折叠。
点击以展开。
docs/2/css/doc.min.css
浏览文件 @
cc66021e
此差异已折叠。
点击以展开。
docs/2/index.html
浏览文件 @
cc66021e
...
...
@@ -60,7 +60,7 @@
<div
id=
"pageHeader"
>
<div
class=
"wrapper"
>
<i
class=
"icon icon-star"
></i>
<h2><
span
class=
"name"
>
图标
</span
></h2>
<h2><
a
class=
"name"
href=
"###"
>
图标
</a
></h2>
<small
class=
"text-muted desc"
>
使用和查找图标
</small>
</div>
<button
data-toggle=
"tooltip"
title=
"最大化"
type=
"button"
class=
"btn btn-link path-max-btn path-btn"
><i
class=
"path-1"
></i></button>
...
...
@@ -69,6 +69,7 @@
<div
id=
"pageBody"
class=
"scrollbar-hover"
>
<div
class=
"text-muted loader"
><i
class=
"icon icon-spin icon-spinner"
></i>
正在拼命加载中...
</div>
<div
id=
"pageContent"
></div>
<nav></nav>
</div>
</div>
</div>
...
...
@@ -143,7 +144,7 @@
<div
class=
"card-heading"
>
<!-- <a class="btn-toggle" href="###"><i class="icon icon-angle-right"></i></a> -->
<i
class=
"icon"
></i>
<h5><
span
class=
"name"
></span
></h5>
<h5><
a
class=
"name"
href=
"###"
></a
></h5>
<small
class=
"text-muted desc"
></small>
</div>
<div
class=
"card-content "
>
...
...
src/js/doc.js
浏览文件 @
cc66021e
...
...
@@ -70,6 +70,8 @@
$body
[
0
].
removeChild
(
scrollDiv
);
}
console
.
log
(
'
checkScrollbar
'
,
scrollBarWidth
);
if
(
scrollBarWidth
)
{
var
bodyPad
=
parseInt
((
$body
.
css
(
'
padding-right
'
)
||
0
),
10
);
$body
.
css
(
'
padding-right
'
,
bodyPad
+
scrollBarWidth
);
...
...
@@ -157,10 +159,11 @@
if
(
eachSection
(
function
(
chapter
,
section
,
$sectionList
){
var
chapterName
=
chapter
.
id
;
section
.
chapter
=
chapterName
;
var
$tpl
=
$sectionTemplate
.
clone
().
attr
(
'
id
'
,
'
section-
'
+
chapterName
+
'
-
'
+
section
.
id
).
data
(
'
section
'
,
section
);
var
id
=
chapterName
+
'
-
'
+
section
.
id
;
var
$tpl
=
$sectionTemplate
.
clone
().
attr
(
'
id
'
,
'
section-
'
+
id
).
data
(
'
section
'
,
section
);
$tpl
.
attr
(
'
data-id
'
,
section
.
id
).
attr
(
'
data-chapter
'
,
chapterName
).
attr
(
'
data-order
'
,
order
++
);
var
$head
=
$tpl
.
children
(
'
.card-heading
'
);
$head
.
find
(
'
.name
'
).
text
(
section
.
name
);
$head
.
find
(
'
.name
'
).
text
(
section
.
name
)
.
attr
(
'
href
'
,
'
#
'
+
id
)
;
$head
.
children
(
'
.desc
'
).
text
(
section
.
desc
);
displaySectionIcon
(
$head
.
children
(
'
.icon
'
),
section
);
var
$topics
=
$tpl
.
find
(
'
.topics
'
);
...
...
@@ -609,11 +612,11 @@
};
var
closePage
=
function
()
{
if
(
$body
.
hasClass
(
'
page-
show
'
))
{
if
(
$body
.
hasClass
(
'
page-
open
'
))
{
var
style
=
$page
.
data
(
'
trans-style
'
);
style
[
'
max-height
'
]
=
''
;
$page
.
css
(
style
);
$body
.
addClass
(
'
page-show-out
'
).
removeClass
(
'
page-show-in
'
);
$body
.
addClass
(
'
page-show-out
'
).
removeClass
(
'
page-
open page-
show-in
'
);
setTimeout
(
function
(){
$body
.
removeClass
(
'
page-show page-show-out
'
);
resetScrollbar
();
...
...
@@ -624,12 +627,17 @@
};
var
openPage
=
function
(
$section
,
section
,
topic
)
{
var
pageId
=
section
.
chapter
+
'
-
'
+
section
.
id
;
if
(
$body
.
hasClass
(
'
page-open
'
)
&&
pageId
===
$body
.
attr
(
'
data-page
'
))
{
if
(
debug
)
console
.
error
(
'
The page already showed.
'
);
return
;
}
chooseSection
(
$section
,
false
,
true
);
closePage
();
$body
.
attr
(
'
data-page-chapter
'
,
section
.
chapter
);
displaySectionIcon
(
$pageHeader
.
children
(
'
.icon
'
),
section
);
$pageHeader
.
find
(
'
.name
'
).
text
(
section
.
name
);
window
.
location
.
hash
=
'
#
'
+
pageId
;
$body
.
attr
(
'
data-page-chapter
'
,
section
.
chapter
).
attr
(
'
data-page
'
,
pageId
);
displaySectionIcon
(
$pageHeader
.
find
(
'
.icon
'
),
section
);
$pageHeader
.
find
(
'
.name
'
).
text
(
section
.
name
).
attr
(
'
href
'
,
'
#
'
+
section
.
chapter
+
'
-
'
+
section
.
id
);
$pageHeader
.
children
(
'
.desc
'
).
text
(
section
.
desc
);
$pageContent
.
html
(
''
);
var
$loader
=
$page
.
addClass
(
'
loading
'
).
find
(
'
.loader
'
).
addClass
(
'
loading
'
);
...
...
@@ -642,6 +650,13 @@
$pageBody
.
scrollTop
(
0
);
});
if
(
$body
.
hasClass
(
'
page-open
'
))
{
if
(
debug
)
console
.
log
(
'
open section in open page
'
,
section
);
return
;
}
$body
.
addClass
(
'
page-open
'
);
toggleCompactMode
(
true
,
function
(){
var
offset
=
$section
.
offset
();
var
sectionHeight
=
$section
.
outerHeight
();
...
...
@@ -652,11 +667,11 @@
height
:
sectionHeight
,
'
max-height
'
:
sectionHeight
};
$page
.
css
(
style
).
data
(
'
trans-style
'
,
style
);
$pageBody
.
css
(
'
width
'
,
bestPageWidth
);
checkScrollbar
();
$body
.
addClass
(
'
page-show
'
);
$page
.
css
(
style
).
data
(
'
trans-style
'
,
style
);
$pageBody
.
css
(
'
width
'
,
bestPageWidth
);
setTimeout
(
function
(){
$body
.
addClass
(
'
page-show-in
'
);
if
(
$page
.
hasClass
(
'
loading
'
))
$page
.
addClass
(
'
openning
'
).
css
(
'
height
'
,
380
);
...
...
@@ -664,6 +679,7 @@
setTimeout
(
function
(){
$page
.
removeClass
(
'
openning
'
);
bestPageWidth
=
$pageBody
.
css
(
'
width
'
,
''
).
width
()
+
40
;
resizePage
();
},
310
);
},
10
);
});
...
...
@@ -673,6 +689,34 @@
section
=
section
||
$choosedSection
;
var
$section
;
if
(
$
.
isArray
(
section
))
{
var
docIndex
=
dataset
[
INDEX_JSON
];
if
(
docIndex
&&
section
.
length
>
1
)
{
var
sectionId
=
section
[
1
];
var
sections
=
docIndex
.
chapters
[
section
[
0
]].
sections
;
var
ok
=
false
;
for
(
var
i
in
sections
)
{
var
s
=
sections
[
i
];
if
(
s
.
id
===
sectionId
)
{
if
(
section
.
length
>
2
)
{
topic
=
section
[
2
];
}
section
=
s
;
ok
=
true
;
break
;
}
}
if
(
!
ok
)
{
console
.
error
(
"
Open section failed: can't find the section with id
"
+
section
.
join
(
'
-
'
));
return
;
}
}
else
{
if
(
debug
)
{
console
.
error
(
"
Open section stop by null docIndex or wrong section value.
"
);
}
return
;
}
}
if
(
$
.
isPlainObject
(
section
))
{
$section
=
$
(
'
#section-
'
+
section
.
chapter
+
'
-
'
+
section
.
id
);
}
else
{
...
...
@@ -701,6 +745,8 @@
}
};
window
.
openS
=
openSection
;
var
resizePage
=
function
()
{
if
(
$body
.
hasClass
(
'
page-show-out
'
)
||
$page
.
hasClass
(
'
loading
'
))
return
;
var
height
;
...
...
@@ -711,7 +757,6 @@
height
=
Math
.
min
(
$pageContainer
.
outerHeight
(),
$pageHeader
.
outerHeight
()
+
$pageContent
.
outerHeight
()
+
50
);
}
$page
.
css
(
'
height
'
,
height
);
console
.
log
(
'
resize page height to
'
,
height
);
};
$
(
function
()
{
...
...
@@ -742,7 +787,18 @@
});
bestPageWidth
=
$grid
.
children
(
'
.container
'
).
outerWidth
();
$body
.
toggleClass
(
PAGE_SHOW_FULL
,
$
.
store
.
get
(
PAGE_SHOW_FULL
,
false
));
loadData
(
INDEX_JSON
,
displaySection
);
loadData
(
INDEX_JSON
,
function
(
data
){
displaySection
(
data
);
var
hash
=
window
.
location
.
hash
if
(
hash
)
{
hash
=
hash
.
substr
(
1
);
setTimeout
(
function
(){
openSection
(
hash
.
split
(
'
-
'
));
},
300
);
}
else
{
$queryInput
.
focus
();
}
});
// Bind events
$
(
document
).
on
(
'
click
'
,
function
(
e
){
...
...
@@ -785,6 +841,7 @@
closePage
();
}).
on
(
'
click
'
,
'
.path-max-btn
'
,
function
(){
$body
.
toggleClass
(
PAGE_SHOW_FULL
);
setTimeout
(
resizePage
,
300
);
$
.
store
.
set
(
PAGE_SHOW_FULL
,
$body
.
hasClass
(
PAGE_SHOW_FULL
));
});
...
...
@@ -808,7 +865,7 @@
}
}).
on
(
'
keydown
'
,
function
(
e
){
var
code
=
e
.
which
;
console
.
log
(
'
keydown
'
,
code
);
//
console.log('keydown', code);
var
isPageNotShow
=
!
$body
.
hasClass
(
'
page-show
'
);
if
(
code
===
13
)
{
// Enter
if
(
isPageNotShow
&&
isChoosedSection
())
{
...
...
@@ -837,12 +894,14 @@
}
else
if
(
code
===
38
)
{
// Top
if
(
isPageNotShow
)
{
choosePrevSection
();
e
.
preventDefault
();
}
else
{
scrollToThis
(
$pageBody
,
'
up
'
);
}
}
else
if
(
code
===
40
)
{
// Down
if
(
isPageNotShow
)
{
chooseNextSection
();
e
.
preventDefault
();
}
else
{
scrollToThis
(
$pageBody
);
}
...
...
src/less/doc.less
浏览文件 @
cc66021e
...
...
@@ -598,6 +598,10 @@ body {
font-size: 16px;
margin: 0;
padding: 6px 0;
> a.name {
color: @color-fore;
}
}
> small {
...
...
@@ -802,7 +806,7 @@ body.input-query-focus {
}
#page {
position: relative;
background-color:
#fff
;
background-color:
fade(#fff, 80%)
;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), 0 120px 220px @color-gray-pale;
&.with-shadow #pageHeader {
...
...
@@ -846,6 +850,16 @@ body.input-query-focus {
line-height: 16px;
font-size: 16px;
margin: 0;
> a.name {
color: @color-fore;
&:hover {
text-decoration: none;
color: @color-fore;
cursor: normal;
}
}
}
}
...
...
@@ -972,6 +986,7 @@ body.page-show {
#page {
overflow: hidden;
.transition-fast();
// transition: all 8s;
}
#grid {
...
...
@@ -1021,6 +1036,7 @@ body.page-show {
}
#page {
background-color: #fff;
opacity: 1;
left: 0!important;
top: 0!important;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录