Skip to content

Commit 5b2b98d

Browse files
committed
update
1 parent 126adaf commit 5b2b98d

File tree

6 files changed

+126
-107
lines changed

6 files changed

+126
-107
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
.idea

README.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,32 @@
1-
## Welcome to GitHub Pages
2-
3-
You can use the [editor on GitHub](https://github.com/lvshaoge/tree/edit/master/README.md) to maintain and preview the content for your website in Markdown files.
4-
5-
Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files.
6-
7-
### Markdown
8-
9-
Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for
10-
11-
```markdown
12-
Syntax highlighted code block
13-
14-
# Header 1
15-
## Header 2
16-
### Header 3
17-
18-
- Bulleted
19-
- List
20-
21-
1. Numbered
22-
2. List
23-
24-
**Bold** and _Italic_ and `Code` text
25-
26-
[Link](url) and ![Image](src)
1+
## 爱情树
2+
3+
> 修改config.js的配置就可以做一个属于自己的爱情树了,喜欢的话fork or star一下呗~
4+
5+
### config.js 说明
6+
```text
7+
var config = {
8+
// 下面的句子不一定非要7句, 你也可以改成4句,2句话都可以
9+
lines: [
10+
"亲爱的雯雯",
11+
"花开一季,有落红为证",
12+
"逝去的岁月,如何能托于烟尘",
13+
"你的浅笑,是我永生眷恋",
14+
"相思的真情,是否能明白一二",
15+
"亲爱的宝贝,你是我的唯一",
16+
"爱你永远。。。",
17+
],
18+
// 相爱的时间 记住格式不能写错了, 非常重要
19+
// 格式一定要和下面这个时间格式一样
20+
// 分别是 年-月-日 时:分:秒
21+
date: "2017-07-20 20:15:0",
22+
// 双方的名字
23+
names: ["笨笨熊", "黑猪猪"]
24+
}
2725
```
2826

29-
For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/).
30-
31-
### Jekyll Themes
32-
33-
Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/lvshaoge/tree/settings). The name of this theme is saved in the Jekyll `_config.yml` configuration file.
27+
Tip:换背景音乐的话,只需要把 `index_files/music.mp3` 换成你自己的音乐即可, 但是不可以修改文件名称哦.
3428

35-
### Support or Contact
29+
如果不想要音乐, 就把这个music.mp3文件删除.
3630

37-
Having trouble with Pages? Check out our [documentation](https://help.github.com/categories/github-pages-basics/) or [contact support](https://github.com/contact) and we’ll help you sort it out.
31+
## 截图演示
32+
<img src="./index_files/love-tree.gif"/>

config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// 霸都丶傲天 2019/7/9 https://Github.com/AJLoveChina
2+
var config = {
3+
// 下面的句子不一定非要7句, 你也可以改成4句,2句话都可以
4+
lines: [
5+
"亲爱的雯雯",
6+
"花开一季,有落红为证",
7+
"逝去的岁月,如何能托于烟尘",
8+
"你的浅笑,是我永生眷恋",
9+
"相思的真情,是否能明白一二",
10+
"亲爱的宝贝,你是我的唯一",
11+
"爱你永远。。。",
12+
],
13+
// 相爱的时间 记住格式不能写错了, 非常重要
14+
// 格式一定要和下面这个时间格式一样
15+
// 分别是 年-月-日 时:分:秒
16+
date: "2017-07-20 20:15:0",
17+
// 双方的名字
18+
names: ["笨笨熊", "黑猪猪"]
19+
}

index.html

Lines changed: 77 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,75 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
3-
<title>Our Story</title>
4-
5-
<link type="text/css" rel="stylesheet" href="./index_files/default.css">
6-
<script type="text/javascript" src="./index_files/jquery.min.js"></script>
7-
<script type="text/javascript" src="./index_files/jscex.min.js"></script>
8-
<script type="text/javascript" src="./index_files/jscex-parser.js"></script>
9-
<script type="text/javascript" src="./index_files/jscex-jit.js"></script>
10-
<script type="text/javascript" src="./index_files/jscex-builderbase.min.js"></script>
11-
<script type="text/javascript" src="./index_files/jscex-async.min.js"></script>
12-
<script type="text/javascript" src="./index_files/jscex-async-powerpack.min.js"></script>
13-
<script type="text/javascript" src="./index_files/functions.js" charset="utf-8"></script>
14-
<script type="text/javascript" src="./index_files/love.js" charset="utf-8"></script>
15-
<style type="text/css">
16-
<!--
17-
.STYLE1 {color: #666666}
18-
-->
19-
</style>
2+
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<title>Our Story</title>
6+
7+
<link type="text/css" rel="stylesheet" href="./index_files/default.css">
8+
<script type="text/javascript" src="./index_files/jquery.min.js"></script>
9+
<script type="text/javascript" src="./index_files/jscex.min.js"></script>
10+
<script type="text/javascript" src="./index_files/jscex-parser.js"></script>
11+
<script type="text/javascript" src="./index_files/jscex-jit.js"></script>
12+
<script type="text/javascript" src="./index_files/jscex-builderbase.min.js"></script>
13+
<script type="text/javascript" src="./index_files/jscex-async.min.js"></script>
14+
<script type="text/javascript" src="./index_files/jscex-async-powerpack.min.js"></script>
15+
<script type="text/javascript" src="./index_files/functions.js" charset="utf-8"></script>
16+
<script type="text/javascript" src="./index_files/love.js" charset="utf-8"></script>
17+
<script type="text/javascript" src="./config.js"></script>
18+
<style type="text/css">
19+
<!--
20+
.STYLE1 {
21+
color: #666666
22+
}
23+
24+
-->
25+
</style>
2026
</head>
21-
<body>
22-
<audio autoplay="autopaly">
23-
<source src="http://music.baidutt.com/up/kwcswdcp/maaydu.mp3" type="audio/mp3" />
24-
</audio>
25-
<div id="main">
26-
<div id="error">本页面采用HTML5编辑,目前您的浏览器无法显示,请换成谷歌(<a href="http://www.google.cn/chrome/intl/zh-CN/landing_chrome.html?hl=zh-CN&brand=CHMI">Chrome</a>)或者火狐(<a href="http://firefox.com.cn/download/">Firefox</a>)浏览器,或者其他游览器的最新版本。</div>
27-
<div id="wrap">
28-
<div id="text">
29-
<div id="code">
30-
<span class="say">亲爱的戒戒</span><br>
31-
<span class="say"> </span><br>
32-
<span class="say">花开一季,有落红为证</span><br>
33-
<span class="say"> </span><br>
34-
<span class="say">逝去的岁月,如何能托于烟尘</span><br>
35-
<span class="say"> </span><br>
36-
<span class="say">你的浅笑,是我永生眷恋</span><br>
37-
<span class="say"> </span><br>
38-
<span class="say">相思的真情,是否能明白一二</span><br>
39-
<span class="say"> </span><br>
40-
<span class="say">亲爱的宝贝,你是我的唯一</span><br>
41-
<span class="say"> </span><br>
42-
<span class="say">爱你永远。。。</span><br>
43-
<span class="say"> </span><br>
44-
<span class="say"><span class="space"></span> --爱你的哥哥--</span>
45-
</div>
46-
</div>
47-
<div id="clock-box">
48-
吕绍阁<span class="STYLE1"></span> 邸洁<span class="STYLE1">已经相恋了</span>
49-
<div id="clock"></div>
50-
</div>
51-
<canvas id="canvas" width="1100" height="680"></canvas>
27+
<body>
28+
<audio autoplay="autopaly">
29+
<source src="./index_files/music.mp3" type="audio/mp3"/>
30+
</audio>
31+
<div id="main">
32+
<div id="error">本页面采用HTML5编辑,目前您的浏览器无法显示,请换成谷歌(<a
33+
href="http://www.google.cn/chrome/intl/zh-CN/landing_chrome.html?hl=zh-CN&brand=CHMI">Chrome</a>)或者火狐(<a
34+
href="http://firefox.com.cn/download/">Firefox</a>)浏览器,或者其他游览器的最新版本。
35+
</div>
36+
<div id="wrap">
37+
<div id="text">
38+
<div id="code">
5239
</div>
53-
5440
</div>
55-
56-
<script>
57-
</script>
58-
59-
<script>
60-
(function(){
41+
<div id="clock-box">
42+
<span id="clock-box-inside-text">
43+
</span>
44+
<div id="clock"></div>
45+
</div>
46+
<canvas id="canvas" width="1100" height="680"></canvas>
47+
</div>
48+
49+
</div>
50+
51+
<script type="text/javascript">
52+
$('#code').html(config.lines.map(item => {
53+
return `<span class="say">${item}</span><br>
54+
<span class="say"> </span><br>`
55+
}).reduce((a, b) => {
56+
return a + b;
57+
}))
58+
$("#clock-box-inside-text").html(`${config.names[0]}<span class="STYLE1">与</span> ${config.names[1]}<span class="STYLE1">已经相恋了</span>`)
59+
</script>
60+
61+
<script>
62+
(function () {
6163
var canvas = $('#canvas');
62-
64+
6365
if (!canvas[0].getContext) {
6466
$("#error").show();
6567
return false;
6668
}
6769

6870
var width = canvas.width();
6971
var height = canvas.height();
70-
72+
7173
canvas.attr("width", width);
7274
canvas.attr("height", height);
7375

@@ -93,7 +95,7 @@
9395
[546, 357, 608, 252, 678, 221, 6, 100, [
9496
[590, 293, 646, 277, 648, 271, 2, 80]
9597
]]
96-
]]
98+
]]
9799
],
98100
bloom: {
99101
num: 700,
@@ -112,17 +114,17 @@
112114
var foot = tree.footer;
113115
var hold = 1;
114116

115-
canvas.click(function(e) {
117+
canvas.click(function (e) {
116118
var offset = canvas.offset(), x, y;
117119
x = e.pageX - offset.left;
118120
y = e.pageY - offset.top;
119121
if (seed.hover(x, y)) {
120-
hold = 0;
122+
hold = 0;
121123
canvas.unbind("click");
122124
canvas.unbind("mousemove");
123125
canvas.removeClass('hand');
124126
}
125-
}).mousemove(function(e){
127+
}).mousemove(function (e) {
126128
var offset = canvas.offset(), x, y;
127129
x = e.pageX - offset.left;
128130
y = e.pageY - offset.top;
@@ -147,14 +149,14 @@
147149

148150
var growAnimate = eval(Jscex.compile("async", function () {
149151
do {
150-
tree.grow();
152+
tree.grow();
151153
$await(Jscex.Async.sleep(10));
152154
} while (tree.canGrow());
153155
}));
154156

155157
var flowAnimate = eval(Jscex.compile("async", function () {
156158
do {
157-
tree.flower(2);
159+
tree.flower(2);
158160
$await(Jscex.Async.sleep(10));
159161
} while (tree.canFlower());
160162
}));
@@ -186,14 +188,14 @@
186188
}));
187189

188190
var textAnimate = eval(Jscex.compile("async", function () {
189-
var together = new Date();
190-
together.setFullYear(2014, 05, -15); //时间年月日
191-
together.setHours(20); //小时
192-
together.setMinutes(00); //分钟
193-
together.setSeconds(0); //秒前一位
194-
together.setMilliseconds(2); //秒第二位
195-
196-
$("#code").show().typewriter();
191+
var together = new Date();
192+
together.setFullYear(2014, 05, -15); //时间年月日
193+
together.setHours(20); //小时
194+
together.setMinutes(00); //分钟
195+
together.setSeconds(0); //秒前一位
196+
together.setMilliseconds(2); //秒第二位
197+
198+
$("#code").show().typewriter();
197199
$("#clock-box").fadeIn(500);
198200
while (true) {
199201
timeElapse(together);
@@ -214,7 +216,8 @@
214216

215217
runAsync().start();
216218
})();
217-
</script>
219+
</script>
218220

219221

220-
</body></html>
222+
</body>
223+
</html>

index_files/love-tree.gif

711 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)