-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
294 lines (284 loc) · 12.4 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.png" type="image/x-icon">
<title>invitation</title>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script src="https://unpkg.com/vue-typer/dist/vue-typer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="./assets/base.css" rel="stylesheet">
<link href="./assets/snow.css" rel="stylesheet">
<!--link href="./font/bootstrap-icons.css" rel="stylesheet"-->
</head>
<body topmargin="0" oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" oncopy="document.selection.empty()" onbeforecopy="return false">
<audio id="audio_music" preload="auto" oncanplay="music_load_complete()" autobuffer hidden>
<source src="./music/didi.mp3" type="audio/mpeg">
<source src="./music/Time To Love-October fast.mp3" type="audio/mpeg">
</audio>
<div class="modal fade" id="dialogModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content" id="dialogButton">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">提 示</h5>
<button type="button" class="btn-close" aria-label="Close" v-on:click='confirm_quit'></button>
</div>
<div class="modal-body" style="font-family:'STHeiti'">
<font >你的朋友给你发了一封信件,现在查收吗?</font>
</div>
<div class="modal-footer" >
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" hidden>退出</button>
<button type="button" class="btn btn-primary" v-on:click='confirm_enter'>确 认</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="envelopeModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content" >
<div class="modal-header" hidden>
<h5 class="modal-title" id="staticBackdropLabel">title</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" style="padding: 0px;">
<!--img style="width:100%;" src="./assets/invitation.jpg"-->
<div class="container">
<div class="flip"></div>
<div class="envelope" onclick="envelopeToggle();"></div>
<div class="letter">
<img style="width:100%;" src="./assets/invitation.jpg">
<div class="text-center" style="vertical-align: middle;float: none;">
<div id="snow_scene">
</div>
<div style="margin:0rem;">
<img width="64" height="64" src="./assets/bird.svg">
<font class="text-dark" style="font-size: 2rem;font-family:'SimHei'">婚 礼 请 柬</font>
<img width="64" height="64" src="./assets/bird_t.svg">
</div>
<div style="margin:1rem;">
<h4 style="font-family:'KaiTi'"> 你 好<img class='beat_heart' width="24" height="24" src="./assets/heart-red.svg">世界</h4>
</div>
<div style="margin:1rem;">
<h6 style="font-family:'STKaiti'"><img width="24" height="24" src="./assets/alarm.svg" hidden> 000年0月0号 星期天 00:00点</h6>
</div>
<div style="margin:1rem;">
<h6 style="font-family:'FangSong'"><img width="24" height="24" src="./assets/geo.svg" hidden> 成都</h6>
</div>
<div style="margin:1rem;">
<font style="font-family:'FangSong'">欢迎</font>
</div>
<div style="margin:1rem;" hidden>
<img class='beat_heart' width="24" height="24" src="./assets/heart-red.svg">
</div>
</div>
</div>
<div class="seal" onclick="envelopeToggle();">
<img width="48" height="48" src="./assets/award-fill.svg">
<img width="48" height="48" src="./assets/bookmark-heart.svg" hidden>
<img width="48" height="48" src="./assets/bookmark-heart-fill.svg" hidden>
</div>
</div>
</div>
<div class="modal-footer" hidden>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">close</button>
<button type="button" class="btn btn-primary">Understood</button>
</div>
</div>
</div>
</div>
<div class="wedding">
<div class="wedding-editor">
<header class="editor-header">
<a href="javascript:;" one-link-mark="yes"></a>
<a href="javascript:;" class="minimum" one-link-mark="yes"></a>
<a href="javascript:;" class="maximum" one-link-mark="yes"></a>
</header>
<p class="code" id="code">
<template v-for="value in content">
<li><font v-html="value.head"></font><vue-typer :text="value.text" :repeat='0' :type-delay="value.delay" @completed='onComplete'></vue-typer></li>
<div style='text-align:center;' v-if='value.heart' v-on:click='click_heart'><span class='icon_heart'>{{value.heart}}</span></div>
</template>
</p>
</div>
</div>
</body>
<script>
var code_content=[
{head:"",text:"正在连接你的手机",delay:70},
{head:`ip:[${returnCitySN['cip']}],${returnCitySN['cname']}`,text:" ",delay:300},
{head:`等待连接 `,text:"...",delay:800},
{head:"连接成功!",text:" ",delay:300},
{head:"<br>",text:"Welcome to Friend 1.0 LTS",delay:50},
{head:"<br>",text:"",delay:50},
{head:"<font color='Silver'>[~ ]# </font>",text:"wget http://love.com/love.sh ",delay:50},
{head:"<font color='Cyan'>下载代码 </font>",text:"[=================>] 100%",delay:50},
{head:"<font color='Silver'>[~ ]# </font>",text:"write 'U+1F466 U+1F467'",delay:50},
{head:"<font color='Silver'>写入👦 👧成功!</font>",text:" ",delay:100},
{head:"<font color='Silver'>[~ ]# </font>",text:"join family code",delay:50},
{head:"<font color='Red'>加入错误,🏠需要条件!!</font>",text:" ",delay:100},
{head:"<font color='Silver'>[~ ]# </font>",text:"add happiness",delay:100},
{head:"<font color='Cyan'>添加💑完成! </font>",text:" ",delay:100},
{head:"<font color='Silver'>[~ ]# </font>",text:"run love.sh ",delay:100},
{head:"<font color='Red'>运行失败!条件不够!</font>",text:" ",delay:100},
{head:"<font color='Silver'>[~ ]# </font>",text:"add eternal love",delay:50},
{head:"<font color='Red'>添加❤️完成!</font>",text:" ",delay:100},
{head:"<font color='Silver'>[~ ]# </font>",text:"build love.sh code",delay:50},
{head:"<font color='Cyan'>构建代码 </font>",text:"👦❤️👧 => 🏠",delay:40},
{head:"<font color='Cyan'>💖💖💖💖💖💖💖💖💖💖💖💖💖💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💖💎💎💎💖💖💖💖💎💎💎💖💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💎💎💎💎💎💖💖💎💎💎💎💎💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💎💎💎💎💎💎💎💎💎💎💎💎💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💖💎💎💎💎💎💎💎💎💎💎💖💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💖💖💎💎💎👦👧💎💎💎💖💖💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💖💖💖💎💎💎💎💎💎💖💖💖💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💖💖💖💖💎💎💎💎💖💖💖💖💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💖💖💖💖💖💎💎💖💖💖💖💖💖</font>",text:"",delay:40},
{head:"<font color='Cyan'>💖💖💖💖💖💖💖💖💖💖💖💖💖💖</font>",text:"",delay:40},
{head:"<font color='Silver'>[~ ]# </font>",text:"load letter music",delay:50},
{head:"<font color='Silver'>[~ ]#加载💌🎵成功!</font>",text:" ",delay:100},
{head:"<font color='Cyan'>加载信件</font>",text:"[=================>] 100%",delay:100},
/*{head:"<font color='#00FFFF'>[root@liting ~]# </font>",text:"finished",delay:20,heart:" "},*/
]
var VueTyperPlugin = window.VueTyper.default;
Vue.use(VueTyperPlugin);
var dialogModal = new bootstrap.Modal(document.getElementById('dialogModal'), {
backdrop: 'static',//点击背景是否能被关闭
keyboard: false
});
var imgModal = new bootstrap.Modal(document.getElementById('envelopeModal'), {
backdrop: 'static',//点击背景是否能被关闭
keyboard: false
});
var vm = new Vue({
el: '#code',
data: {
dialog: true,
index:0,
content: [
//code_content[0]
]
},
methods: {
onComplete: function() {
if(++this.index < code_content.length){
this.content.push(code_content[this.index]);
document.getElementById("audio_music").play();
}else{
setTimeout(function(){
imgModal.show();
},1000);
}
document.getElementById("code").scrollIntoView(false);//底部显示
},
click_heart:function(event){
console.log("click heart");
imgModal.show();
}
},
})
let envelopeStatus = false;
function envelopeOpen(){
let flip = document.querySelector('.flip');
let envelope = document.querySelector('.envelope');
let letter = document.querySelector('.letter');
let seal = document.querySelector('.seal');
envelopeStatus = "switching";
seal.classList.add('sealOpen');
seal.classList.remove('sealClose');
flip.classList.add('flipOpen');
flip.classList.remove('flipClose');
setTimeout(function(){
envelope.classList.add('envelopeOpen');
envelope.classList.remove('envelopeClose');
letter.classList.add('letterOpen');
letter.classList.remove('letterClose');
envelopeStatus = true;
},600);
}
function envelopeClose(){
let flip = document.querySelector('.flip');
let envelope = document.querySelector('.envelope');
let letter = document.querySelector('.letter');
let seal = document.querySelector('.seal');
envelopeStatus = "switching";
letter.classList.remove('letterOpen');
letter.classList.add('letterClose');
envelope.classList.remove('envelopeOpen');
envelope.classList.add('envelopeClose');
setTimeout(function(){
flip.classList.remove('flipOpen');
flip.classList.add('flipClose');
seal.classList.remove('sealOpen');
seal.classList.add('sealClose');
envelopeStatus = false;
},1000);
}
function envelopeToggle(){
if(envelopeStatus === "switching"){
return;
}
if(envelopeStatus){
envelopeClose();
closemusic();
}else{
envelopeOpen();
playmusic("Time To Love-October fast.mp3");
}
}
new Vue({
el: '#dialogButton',
methods: {
confirm_enter: function(){
dialogModal.hide();
playmusic("didi.mp3");
vm.content.push(code_content[0]);
},
confirm_quit: function(){
window.location.href="about:blank";
window.close();
}
}
});
function playmusic(music){
var audio = document.getElementById("audio_music");
audio.src = `./music/${music}`;
audio.play();
}
function closemusic(){
var audio = document.getElementById("audio_music");
audio.pause();
}
window.onload = function(){
setTimeout(function(){
dialogModal.show();
//imgModal.show();
add_snow_scene(30);//添加下雪
},2000);
}
function music_load_complete(){
//console.log("music load complete");
//alert("music_load_complete");
}
function add_snow_scene(count){
var scene = document.getElementById("snow_scene")
for(let i=0;i<count;i++){
scene.innerHTML=scene.innerHTML + "<div class='snow'>❄️</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>❄️</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>❄️</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>❤️</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>🧡</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>💛</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>💚</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>💙</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>💜</div>";
scene.innerHTML=scene.innerHTML + "<div class='snow'>🤎</div>";
}
}
/*navigator.geolocation.getCurrentPosition(function(position){
console.log("Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude);
});*/
</script>
</html>