-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
137 lines (99 loc) · 3.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Before the feast</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container-main">
<div class="container-txt">
<h3 class="txt-main">
"Before The Feast" - Falz
</h3>
<p class="txt-sub">
Coming Soon!
</p>
<div class="links">
<a href=""><img src="./images/apple-music1.webp" alt="apple-music" class="apple"></a>
<a><img src="./images/Spotify-Icon-Logo.wine.svg" alt="spotify" class="spotify"></a>
<a><img src="./images/Youtube_Music_icon.svg.png" alt="youtube-music" class="youtube"></a>
</div>
</div>
<div class="container-count">
<div class="container-wrapper">
<span class="l1-txt1 days">0</span>
<span class="s1-txt1">Days</span>
<span class="l1-txt1 hours">0</span>
<span class="s1-txt1">Hours</span>
<span class="l1-txt1 minutes">0</span>
<span class="s1-txt1">Minutes</span>
<span class="l1-txt1 seconds">0</span>
<span class="s1-txt1">Seconds</span>
</div>
</div>
</div>
<script>
const day = document.querySelector(".days");
const hour = document.querySelector(".hours");
const min = document.querySelector(".minutes");
const sec = document.querySelector(".seconds");
const wrapper = document.querySelector(".container-wrapper");
const txtSub = document.querySelector(".txt-sub");
const txtMain = document.querySelector(".txt-main");
const apple = document.querySelector(".apple");
const spotify = document.querySelector(".spotify");
const youtube = document.querySelector(".youtube");
const setDate = new Date("2024-6-7 00:00:00").getTime();
const countDown = setInterval(() => {
const today = new Date().getTime();
const diff = setDate - today;
const getDay = Math.floor(diff / (1000 * 60 * 60 * 24));
const getHour = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const getMin = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const getSec = Math.floor((diff % (1000 * 60)) / 1000);
day.innerHTML = getDay;
hour.innerHTML = getHour;
min.innerHTML = getMin;
sec.innerHTML = getSec;
if (diff < 0) {
clearInterval(countDown);
txtSub.innerHTML = "countdown over";
wrapper.classList.add('hidden')
}
}, 1000);
apple.addEventListener('click', function () {
if (txtSub.innerHTML == "countdown over") {
const search = `https://music.apple.com/us/search?term=${txtMain.innerHTML}`;
window.open(search);
}
else {
const search = `https://music.apple.com/us/search?term=falz`;
window.open(search);
}
})
spotify.addEventListener('click', function () {
if (txtSub.innerHTML == "countdown over") {
const search = `https://open.spotify.com/search/${txtMain.innerHTML}`;
window.open(search);
}
else {
const search = `https://open.spotify.com/search/falz`;
window.open(search);
}
})
youtube.addEventListener('click', function () {
if (txtSub.innerHTML == "countdown over") {
const search = `https://music.youtube.com/search?q=${txtMain.innerHTML}`;
window.open(search);
}
else {
const search = `https://music.youtube.com/search?q=falz`;
window.open(search);
}
})
</script>
</body>
</html>