-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
394 lines (365 loc) · 13.5 KB
/
index.html
File metadata and controls
394 lines (365 loc) · 13.5 KB
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>love letter</title>
<meta name="language" content="ko">
<meta name="title" content="love letter">
<meta name="github" content="https://github.com/woorim960/love-letters-collection">
<meta name="describe" content="우리밋,고백,프로포즈,propose,code">
<link rel="icon" type="image/x-icon" href="https://cdn.jsdelivr.net/gh/sun0225SUN/photos/img/20210715233345.png">
<link type="text/css" rel="stylesheet" href="css/theme.css" />
<script src="js/jquery-2.0.3.min.js"></script>
</head>
<body>
<div id="div_container">
<!-- 가장 바깥쪽 div, 중앙 호환 PC 및 모바일용 -->
<div id="div_start_bg"></div>
<div id="div_onlyyou">
<!-- 배경 설정 -->
<div id="div_oy_inner">
<!-- 컨텐츠 저장에 사용 -->
<div class="div_oy_text">
<h1></h1>
<img class="img_oy_text" src="" />
<p class="p_oy_text"></p>
<div></div>
<ul id="ul_oy_benefit">
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
<li class="li_oy_benefit"></li>
</ul>
</div>
<ul id="ul_oy_btn">
<li onclick="oy_go_next()">Yes ❤</li>
<li onclick="oy_show_benefit()">No ✖</li>
</ul>
<div id="div_oy_note" onclick="oy_hide_note()">
<img src="images/emoji_kelian.jpg" alt="" /><br />Yes라고 해..
<div id="div_oy_note_close">✖</div>
</div>
<div id="div_oy_yes">
<img src="images/emoji_bixin.jpg" alt="" /><br />행복해서 기절!
</div>
</div>
</div>
<div class="div_pure_words">
<div class="div_pure_words_bg">
<div class="div_pure_words_height"></div>
</div>
<div class="div_pw_typed">
<span id="span_pw_typed"></span>
</div>
</div>
<div id="div_btn_container">
<div id="div_btn_inner">
<div class="div_music_tips"></div>
<div class="div_btn" id="div_music" onclick="music_switch()">
<!-- 음악 버튼 -->
<img id="img_music" src="images/music_note_big.png"
style="-webkit-animation: music_play_rotate 1s linear infinite;" />
<!-- 브라우저에서 음악 재생을 지원하지 않습니다 -->
<audio id="audio_music" autoplay="autoplay" loop="loop">
<source type="audio/mpeg" />
</audio>
</div>
<div class="div_record_tips"></div>
<div class="div_btn" id="div_record" onclick="record_switch()">
<audio id="audio_record" loop="loop">
<source type="audio/mpeg" />
</audio>
</div>
</div>
</div>
</div>
<script>
// 클라이언트 디바이스 판단, 메타데이터 쓰기
function init_viewport() {
if (navigator.userAgent.indexOf("Android") != -1) {
var version = parseFloat(RegExp.$1);
if (version > 2.3) {
var width =
window.outerWidth == 0 ? window.screen.width : window.outerWidth;
var phoneScale = parseInt(width) / 500;
document.write(
'<meta name="viewport" content="width=500, minimum-scale = ' +
phoneScale +
", maximum-scale = " +
phoneScale +
', target-densitydpi=device-dpi">'
);
} else {
document.write(
'<meta name="viewport" content="width=500, target-densitydpi=device-dpi, user-scalable=0">'
);
}
} else if (navigator.userAgent.indexOf("iPhone") != -1) {
var phoneScale = parseInt(window.screen.width) / 500;
document.write(
'<meta name="viewport" content="width=500, min-height=750, initial-scale=' +
phoneScale +
", maximum-scale=" +
phoneScale +
', user-scalable=0" /> '
); //0.75 0.82
} else {
document.write(
'<meta name="viewport" content="width=500, height=750, initial-scale=0.64" /> '
); //0.75 0.82
}
}
init_viewport();
// 날짜 구하기
var today = new Date();
var year = today.getFullYear(); // 년도
var month = today.getMonth() + 1; // 월
var date = today.getDate(); // 날짜
var day = today.getDay(); // 요일
var hours = today.getHours(); // 시
var minutes = today.getMinutes(); // 분
var seconds = today.getSeconds(); // 초
var theme = "pure_words";
console.log("theme ->" + theme);
var theme_content = {
pure_words_content:
`고마워,오늘 ${year}년 ${month}월 ${date}일 ${hours}시 ${minutes}분 ${seconds}초 부터 나는 너를 내 여자친구라고 소개할거야. 하루 하루 나와 함께하는 모든 시간을 행복으로 채워줄게.<br><br>사랑해, 그리고 고마워!<br>김유리 <um style='color: #F44336;'>💕</um> 홍길동..<br><br>오늘부터 1일..`,
typed_bool: "typed_y",
cursor_char: "cursor_heart",
bg_style_pure_words: "bg_opacity",
bg_img: "images/3.jpg",
simple_page_content: "",
video_page_content: "",
};
console.log(theme_content);
var music_json = {
music_select: "m_online",
m_online_id: "7",
m_online_url: "images/1.mp3",
m_upload_name: "null",
m_upload_url: "null",
};
console.log(music_json);
var record_json = {
record_bool: "r_false",
r_wechat_time: "null",
r_wechat_url: "null",
r_wechat_amr: "null",
};
console.log(record_json);
var main_title = "I Love You ❤️";
// console.log(main_title);
if (main_title == "" || main_title == "null") {
// 제목이 빈 경우 아래 타이틀 삽입
document.title = "I Love You ❤️";
}
var window_height = $(window).height();
console.log("window_height ->" + window_height);
var pure_words_content = theme_content["pure_words_content"];
var str_cursorChar;
var typed_bool;
var interval_pw_height;
var height_div_pw = $(".div_pure_words_height").height();
function init_pure_words() {
$(".div_pure_words_height").html(pure_words_content + "22222"); // 복사 내용을 초기화하고 문서 높이를 늘립니다
// div의 bg 그림 초기화 설정
if (
typeof theme_content["bg_style_pure_words"] != "undefined" &&
theme_content["bg_style_pure_words"] == "bg_opacity"
) {
if (
typeof theme_content["bg_img"] != "undefined" &&
theme_content["bg_img"] != ""
) {
$(".div_pure_words_bg").css({
"background-image": "url(" + theme_content["bg_img"] + ")",
});
}
}
// 다음은 타이핑 효과의 js입니다.
if (
typeof theme_content["cursor_char"] != "undefined" &&
theme_content["cursor_char"] != ""
) {
switch (
theme_content["cursor_char"] // 타이핑 커서 스타일 설정
) {
case "cursor_heart":
str_cursorChar = '<um style="color: #F44336;">❤</um>';
break;
case "cursor_sub":
str_cursorChar = "_";
break;
case "cursor_music":
str_cursorChar = "♫";
break;
case "cursor_star":
str_cursorChar = "★";
break;
case "cursor_sun":
str_cursorChar = "☀";
break;
default:
str_cursorChar = "|";
}
} else {
// 새로운 작품을 처리하고, 기본적으로 타이핑 효과를 표시합니다.
str_cursorChar = "❤";
}
// 사용자가 타이핑 효과를 선택했는지 여부를 판단하다
if (
typeof theme_content["typed_bool"] != "undefined" &&
theme_content["typed_bool"] != ""
) {
typed_bool = theme_content["typed_bool"] == "typed_y" ? true : false;
} else {
typed_bool = false; // 기본적으로 타이핑 효과 보이기
}
display_pure_words();
$(".div_pure_words").fadeIn();
interval_pw_height = setInterval(function () {
console.log(
"div_pure_words_height -> " + $(".div_pure_words_height").height()
);
var least_height_div_pw = $(".div_pure_words_height").height();
if (least_height_div_pw > height_div_pw) {
height_div_pw = least_height_div_pw;
} else {
clearInterval(interval_pw_height);
$(".div_pure_words_height").height(least_height_div_pw + 100);
if ($(".div_pure_words_height").height() < window_height) {
$(".div_pure_words_height").height(window_height); // 창 높이보다 작을 수 없음
console.log("let us be high as window");
}
}
}, 100);
}
function display_pure_words() {
if (typed_bool) {
var typed_pure_words = new Typed("#span_pw_typed", {
strings: [pure_words_content], // 내용 입력, HTML 태그 지원
typeSpeed: 120, // 타이핑 속도
cursorChar: str_cursorChar, // 커서 스타일 바꾸기
contentType: "html", // 값이 html일 경우 인쇄된 텍스트 라벨을 html 라벨로 직접 해석
onComplete: function (abc) {
// console.log(abc);
console.log("finished typing words");
// console.log($('#span_pw_typed').height()-$(".div_pure_words_height").height());
},
});
} else {
// 타이핑이 필요하지 않으면 바로 표시
$("#span_pw_typed").html(pure_words_content).fadeIn();
}
init_attachment();
}
var start_content = {
chase_title:
"❣️To. 팡이❣️",
chase_text:
"자기야 ~ 오늘 하루도 잘 보냈나아, <br> 오늘은 우리가 만난지 2년이 되는 날이야. <br> 시간이 참 빠르다..! 그치ㅎㅎ 2년동안 자기 덕분에 <br>주저리 주저리..<br>맛집도 가고, 롯데월드도 가자.<br>높은 곳은 무서워하지만 노력해볼게.. 주절주절💕<br><br><um style='color: #F44336; font-weight: 300;'>나랑 사귀자!</um>",
chase_benefit: [
"100일에 한번은 소고기 먹을 수 있게 해줄게",
"눈이 썩을 것 같지 않게 옷도 잘 입고, 패션에 신경쓰는 남편 될게",
"사회적 체면이라는것을 지킬 수 있도록 어디 내놓아도 부끄럽지 않은 남편 될게",
"마지막으로 물어볼게",
"<um style='color: #F44336;font-weight: 300;'>나랑 결혼해줄래?</um>"
],
bg_style: "bg_custom",
bg_img: "images/2.jpg",
img_bool: "img_true",
img_src: "images/1.gif",
}; // null일 수 있음
console.log(start_content);
var start_id;
$(function () {
// 이 이벤트는 인터랙티브한 아이디어를 촉발합니다
start_id = "onlyyou"; // null일 수 있음
init_start(start_id);
});
function init_start(start_id) {
console.log("init_start ->" + start_id);
switch (start_id) {
case "loveformat":
$(".div_loveformat").show();
init_loveformat();
break;
case "hearttree":
$("#div_hearttree").show();
init_hearttree();
break;
case "courage":
$("#div_courage").show();
init_courage();
break;
case "birthdaycake":
$("#div_dbcake").show();
init_birthdaycake();
break;
case "intersect":
$("#div_intersect").show();
init_intersect();
break;
case "onlyyou":
$("#div_onlyyou").show();
init_onlyyou();
break;
default:
init_theme();
}
}
// 애니메이션 본체 시작
function init_theme() {
console.log("init_theme");
// 날짜 구하기
year = today.getFullYear(); // 년도
month = today.getMonth() + 1; // 월
date = today.getDate(); // 날짜
day = today.getDay(); // 요일
hours = today.getHours(); // 시
minutes = today.getMinutes(); // 분
seconds = today.getSeconds(); // 초
$("#div_start_bg").fadeOut();
init_pure_words();
}
var attachment = "null"; // null일 수 있음
var attached_content = {
bool_save: false,
}; // null일 수 있음
console.log(attached_content);
function init_attachment() {
// attachment 시작
console.log("init_attachment ->" + attachment);
switch (attachment) {
case "timer":
init_at_timer();
break;
default:
return;
}
}
</script>
<!-- JQuery -->
<script src="js/typed.min.js"></script>
<script src="js/start_onlyyou.js"></script>
<script src="js/jweixin-1.2.0.js"></script>
<script src="js/theme_common.js"></script>
</body>
</html>