forked from newzqy/rubylouvre.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
206 lines (186 loc) · 6.46 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="mass_merge.js" type="text"></script>
<style type="text">
html{
background:#252D37;
color:white;
}
.modules-slider{
width:900px;
height:30px;
position:relative;
background:black;
overflow:hidden;
}
.modules-slider-left, .modules-slider-right{
width:30px;
height:30px;
line-height: 30px;
text-align: center;
position:absolute;
background: #141414;
color: #a9ea00;
font-size: 16px;
font-weight: bolder;
z-index:2
}
.modules-slider-left{
left:0;
}
.modules-slider-right{
right:0!important;
}
.modules-slider-center{
width:1200px;
height:30px;
position:absolute;
left:30px;
z-index:1
}
.modules-slider-center div{
padding-left: 10px;
padding-right: 1px;
height:30px;
color:#00ff00;
font-weight: bolder;
line-height: 30px;
display:inline-block;
float:left;
}
.modules-slider-center .active{
color:#ff7B26;
}
.left-bar{
text-align: left;
width:150px;
height:400px;
overflow: auto;
float: left;
}
.left-bar ul{
list-style: none;
padding:0;
margin:0;
}
.left-bar ul li {
/* background: #9FF;*/
padding-left: 1em;
height: 25px;
line-height: 25px;
color: #fff;
}
.left-bar ul li.odd {
/* background: #6F9;*/
}
.left-bar ul li.hover {
background: #73c32c!important;
color:#fff;
}
.main-area{
float:left;
width:740px;
height:700px;
}
#main{
width:100%;
height:100%;
background: white;
}
</style>
<script type="text">
require("fx, event, attr, ready", function() {
var center = $(".modules-slider-center");
$(".modules-slider-left,.modules-slider-right").click(function() {
var left = this.className.indexOf("left") !== -1;
if (left) {
var div = $(".modules-slider-center div").last();
var width = div.width();
div.detach().css("marginLeft", -1 * width).prependTo(center);
div.fx({
marginLeft: 0
}, 700);
} else {
var div = $(".modules-slider-center div").first();
var width = div.width();
div.fx({
marginLeft: "-=" + width
}, 700, function() {
center.append(div);
div.css("marginLeft", 0);
});
}
});
});
require("doc/scripts/api, event, node, attr, ready", function(api, $) {
var currentModule = "core";
$(".modules-slider-center div").click(function() {
if (this.className === "active") {
return;
}
$(this).siblings().removeClass("active");
this.className = "active";
var moduleName = this.id.replace("m_", "");
currentModule = moduleName;
var list = ["index"].concat(api[moduleName])
var html = ["<ul>"];
$.each(list, function(index, prop) {
var className = index % 2 === 0 ? "even" : "odd";
html.push("<li class=" + className + ">" + prop + "</li>");
});
html.push("</ul>");
$(".left-bar").html(html.join(""));
});
var iframe = $("#main").get(0);
var url = location.href;
var basePath = url.slice(0, url.lastIndexOf("/") + 1)
iframe.src = basePath + "doc/core/index.html";
$(".left-bar").delegate("li", "mouseover", function() {
$(this).addClass("hover");
}).delegate("li", "mouseout", function() {
$(this).removeClass("hover");
}).delegate("li", "click", function() {
var url = basePath + "doc/" + currentModule + "/" + $(this).text().trim() + ".html";
var iframe = $("#main").get(0)
if (url !== iframe.src) {
iframe.src = url;
}
})
});
</script>
</head>
<body>
<a href="/mvvm/index.html">迷你MVVM框架avalon</a>
<div style="display:none">
<center><h1>mass Framework文档</h1></center>
<div class="modules-slider">
<div class="modules-slider-left">◀</div>
<div class="modules-slider-center">
<div id="m_core">种子模块</div>
<div id="m_lang">语言扩展模块</div>
<div id="m_class">类工厂模块</div>
<div id="m_data">数据缓存模块</div>
<div id="m_flow">流程模块</div>
<div id="m_query">选择器模块</div>
<div id="m_node">节点模块</div>
<div id="m_css">样式模块</div>
<div id="m_event">事件模块</div>
<div id="m_attr">属性模块</div>
<div id="m_fx">动画模块</div>
<div id="m_ajax">AJAX模块</div>
<!-- <div id="m_newland">newland后端框架</div>-->
</div>
<div class="modules-slider-right">▶</div>
</div>
<div>
<div class="left-bar"></div>
<div class="main-area">
<iframe id="main" >
</iframe>
</div>
</div>
</div>
</body>
</html>