-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
137 lines (123 loc) · 3.96 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
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LIAN WAR: SEASON 2</title>
<link rel="icon" href="https://cdn.discordapp.com/attachments/907576496430936085/1168925685029548144/favicon.ico" type="image/x-icon">
<style>
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');
body, html {
margin: 0;
padding: 0;
height: 100%;
}
#header {
background-image: url('https://i.imgur.com/kVKwkgV.png');
background-size: cover;
background-position: center;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
transition: height 0.5s ease-in-out;
}
.overlay {
background-color: rgba(0, 0, 0, 0.5);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.overlay h1 {
font-size: calc(8vw + 1em);
transition: height 0.5s ease-in-out;
background: url('https://i.imgur.com/kVKwkgV.png');
background-size: cover;
background-position: center;
background-size: auto;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
#countdown {
text-align: center;
padding: 20px;
background-color: #000;
}
#timer {
font-size: 4vw;
color: #fff;
font-family: 'Anton', sans-serif;
text-align: center;
}
#discord-button-section {
text-align: center;
padding: 20px;
background-color: #000;
}
#discord-button {
text-decoration: none;
font-size: 1.5em;
color: #fff;
background-color: #7289da;
padding: 10px 20px;
border-radius: 5px;
transition: background-color 0.3s ease;
}
#discord-button:hover {
background-color: #5865f2;
}
#teaser {
background-color: #000;
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<section id="header">
<div class="overlay">
<h1>LIAN WAR: SEASON 2</h1>
</div>
</section>
<span id="scrollY"></span>
<section id="countdown">
<span id="timer"></span>
</section>
<section id="discord-button-section">
<a href="https://discord.gg/WHNRCdsPEZ" id="discord-button">디스코드 서버 참가하기!</a>
</section>
<section id="teaser">
<div id="youtube-embed"><iframe height=0 src=""></iframe></div>
</section>
<script>
const endDate = new Date('2023-12-22T23:00:00+09:00');
const timer = document.getElementById('timer');
function updateTimer() {
const now = new Date();
const remainingTime = endDate - now;
const days = Math.floor(remainingTime / (1000 * 60 * 60 * 24));
const hours = Math.floor((remainingTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((remainingTime % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((remainingTime % (1000 * 60)) / 1000);
timer.innerHTML = `${days} . ${hours} . ${minutes} . ${seconds}`;
}
setInterval(updateTimer, 500);
updateTimer();
let scrollY = 0;
window.addEventListener('scroll', function () {
scrollY = window.scrollY;
const title = document.querySelector('.overlay h1');
const opacity = 1 - scrollY / document.body.scrollHeight;
title.style.color = opacity > 0 ? 'white' : 'transparent';
});
</script>
</body>
</html>