Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
luofei2011 committed Nov 13, 2013
1 parent 3a274c8 commit 8ed4997
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 21 deletions.
Binary file added se-fe/333.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added se-fe/444.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions se-fe/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@ var _color = ['light-gray',//'rgb(106, 99, 95)', // 浅灰色
],
// 标题参数
_title = ['VUI', 'Tips', 'Security', 'Javascript', 'Float'],
_config = {
"首页": [],
"代码规范": [],
"UI统一": [],
"API": [],
"平台支持": [],
"性能": [],
"工具": [],
"手册": []
},
_d = document,
contains,
wrapper,
lock,
isDebug = true; // 是否加载调试功能
isDebug = true, // 是否加载调试功能

var position = [
// 位置信息,目前只取到2层共24个子项目
position = [
[
[-1, -1],
[-1, 0],
Expand Down
43 changes: 24 additions & 19 deletions se-fe/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,43 +207,45 @@ var FE = {
*/
createItem: function(arr, opp) {
var i = 0, _num,
len = arr.length;
len = arr.length, cName;
// console.log(arr);
this.titleList.length = 0;
if (opp) {
for (; i < len; i++) {
_num = arr[i];
cName = "item " + _color[_num] + "-border";
this.titleList.push(i);
contains[i].className += " " + _color[_num] + " cursor-pointer";
contains[i].innerHTML = "<span class='i-idx'>0" + (_num + 1) + "</span>" +
"<span class='i-title'>" + _title[_num] + "</span>" +
"<div class='details' title='" + _title[_num] + "'>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"</div>";
}
} else {
for (; i < len; i++) {
_num = arr[i];
cName = "item " + _color[i] + "-border";
this.titleList.push(_num);
contains[_num].className += " " + _color[i] + " cursor-pointer";
contains[_num].innerHTML = "<span class='i-idx'>0" + (i + 1) + "</span>" +
"<span class='i-title'>" + _title[i] + "</span>" +
"<div class='details' title='" + _title[_num] + "'>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='item'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"<div class='" + cName + "'></div>" +
"</div>";
}
}
Expand Down Expand Up @@ -419,14 +421,17 @@ $(function() {
$(this).stop().show().animate({
left: xyArr[i].x - p.left,
top: xyArr[i].y - p.top,
opacity: 1
opacity: 1,
"border-width": 1
}, 200, function() {
FE.lock.push('ok');
// console.log(FE.lock.length, children.length);
if (FE.lock.length > children.length) {
FE.lock.length = 0;
};
});
}).animate({
"border-width": 0
}, 300);
// 让无法显示的子标题默认开启,让锁能正常打开
} else {
FE.lock.push('ok');
Expand Down
69 changes: 69 additions & 0 deletions se-fe/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<title>test</title>
<link type="text/css" href="main.css" rel="stylesheet">
Expand Down Expand Up @@ -86,5 +87,73 @@
<!-- <div class="cover"></div> -->
<!-- <div class="details"></div> -->
<div class="animate"></div>
<style>
.ws-tips {
position: absolute;
right: 10px;
top: 20px;
width: 248px;
height: 76px;
background: #fff;
}
.ws-tips img {
vertical-align: middle;
}
.ws-logo {
float: left;
}
.ws-logo img {
width: 56px;
height: 56px;
position: absolute;
left: 10px;
top: 10px;
}
.ws-d-info {
text-align: center;
width: 141px;
height: 46px;
position: absolute;
left: 76px;
top: 15px;
}
.ws-d-info span {
font-size: 14px;
font-family: "宋体";
color: #666;
}
.ws-d-btn {
background: #388bff;
display: block;
width: 141px;
height: 26px;
line-height: 26px;
text-decoration: none;
color: #fff;
font-size: 12px;
font-weight: bold;
font-family: "宋体";
margin-top: 3px;
}
.ws-close-btn {
position: absolute;
right: 8px;
top: 8px;
background: url('444.png') no-repeat;
width: 9px;
height: 9px;
}
</style>
<div class="ws-tips">
<a class="ws-close-btn" href="javascript:void(0);"></a>
<a class="ws-logo">
<img src="333.png"/>
</a>
<div class="ws-d-info">
<span>还你一个轻净的电脑!</span>
<a class="ws-d-btn" href="#">立即安装百度卫士</a>
</div>
</div>
<script type="text/javascript" src="tip.js"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions se-fe/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,51 @@ body {
left: 0;
top: 0;
}
.light-gray-border,
.dark-gray-border,
.pink-border,
.gray-border,
.light-green-border,
.light-blue-border {
border-style: solid;
border-width: 0;
}
.light-gray {
background: rgb(106, 99, 95);
}
.light-gray-border {
border-color: rgb(106, 99, 95);
}
.dark-gray {
background: rgb(64, 59, 56);
}
.dark-gray-border {
border-color: rgb(64, 59, 56);
}
.pink {
background: rgb(215, 112, 117);
}
.pink-border {
border-color: rgb(215, 112, 117);
}
.gray {
background: rgb(106, 99, 95);
}
.gray-border {
border-color: rgb(106, 99, 95);
}
.light-green {
background: rgb(146, 196, 105);
}
.light-green-border {
border-color: rgb(146, 196, 105);
}
.light-blue {
background: rgb(49, 159, 189);
}
.light-blue-border {
border-color: rgb(49, 159, 189);
}
.cursor-pointer {
cursor: pointer;
}
Expand Down
17 changes: 17 additions & 0 deletions se-fe/tip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
;(function(win) {
var _d = win.document,
div = _d.createElement('div'),
idx = _d.cookie.indexOf('bdWs='),

div.setAttribute('class', 'ws-tips');
div.innerHTML = "hello world!!!";

console.log(_d.cookie);
if (idx !== -1 && _d.cookie[idx + 5] !== ";" && _d.cookie[idx + 5]) {
// if (idx !== -1) {
return;
} else {
_d.body.appendChild(div);
_d.cookie = "bdWs=o";
}
})(window);

0 comments on commit 8ed4997

Please sign in to comment.