-
Notifications
You must be signed in to change notification settings - Fork 2
/
clonify.html
386 lines (344 loc) · 22.4 KB
/
clonify.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<script>
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>
<!-- add icon link -->
<link rel = "icon" href = "logomusic.png" type = "image/x-icon">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Clonify - Listening new way</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Mochiy+Pop+P+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');
body{
background-color: antiquewhite;
}
*{
margin: 0;
padding: 0;
}
nav{
font-family: 'Mochiy Pop P One', sans-serif;
}
nav ul{
display: flex;
align-items: center;
list-style-type: none;
height: 65px;
background-color: #12d138;
color: white;
}
nav ul li{
padding: 0 12px;
text-align: center;
width: 32%;
font-size: 49px;
height: 11vh;
}
.brand img{
width: 130px;
padding: 0 8px;
}
.brand{
display: flex;
align-items: center;
font-weight: bolder;
font-size: 1.3rem;
}
.container{
min-height: 65vh;
background-color: black;
color: white;
font-family: 'Varela Round', sans-serif;
display: flex;
width: 75%;
margin: 73px auto;
border-radius: 12px;
padding: 34px;
background-image: url(colnifybackground.jpg);
background-position: center; /* center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
.bottom{
position: sticky;
height: 100px;
background-color: Black;
color: white;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.icons{
margin-top: 10px;
}
.icons i{
cursor: pointer;
}
#myProgressBar{
width: 58vw;
cursor: pointer;
}
.songItemContainer{
margin-top: 74px;
}
.songItem{
height: 50px;
display: flex;
background-color: Black;
color: white;
margin: 12px 0;
justify-content: space-between;
align-items: center;
border-radius: 34px;
opacity: 100%;
}
.songItem img{
width: 35px;
margin: 0 23px;
border-radius: 34px;
}
.timestamp{
margin: 0 23px;
font-size: 20px;
}
.timestamp i{
cursor: pointer;
}
.songInfo{
position: absolute;
left: 0;
font-family: 'Varela Round', sans-serif;
}
.songInfo img{
opacity: 0;
transition: opacity 0.569s ease-in;
}
@media only screen and (max-width: 1100px) {
body {
background-color: black;
}
}
</style>
</head>
<body>
<nav>
<ul>
<li class="brand"><a href="index.html"><img src="colnifylogo.png" alt="clonify"></a></li>
<li>Clonify</li>
</ul>
</nav>
<div class="container">
<div class="songList">
<h1>
Change your mOOd - Moodify
</h1>
<div class="songItemContainer">
<div class="songItem"><img alt="1"><span class="songName">Shiddat Title Track</span><span class="songlistplay"><span class="timestamp"> <i id="0" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Excuses</span><span class="songlistplay"><span class="timestamp"> <i id="1" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">DJ Gimi-O x Habibi [Albanian Remix]</span><span class="songlistplay"><span class="timestamp"> <i id="2" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Ritviz & Nucleya - Baaraat</span><span class="songlistplay"><span class="timestamp"> <i id="3" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Dil Ko Karaar Aaya</span><span class="songlistplay"><span class="timestamp"> <i id="4" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Soch Liya</span><span class="songlistplay"><span class="timestamp"> <i id="5" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Way Back Home</span><span class="songlistplay"><span class="timestamp"> <i id="6" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">BTS (방탄소년단) 'Dynamite'</span><span class="songlistplay"><span class="timestamp"> <i id="7" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Azeri </span><span class="songlistplay"><span class="timestamp"> <i id="8" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">High School</span><span class="songlistplay"><span class="timestamp"> <i id="9" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Albatraoz</span><span class="songlistplay"><span class="timestamp"> <i id="10" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Lovely</span><span class="songlistplay"><span class="timestamp"> <i id="11" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">A Different way</span><span class="songlistplay"><span class="timestamp"> <i id="12" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Yaadon Ki Baraat</span><span class="songlistplay"><span class="timestamp"> <i id="13" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Khairiyat</span><span class="songlistplay"><span class="timestamp"> <i id="14" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Dil Mein Ho Tum</span><span class="songlistplay"><span class="timestamp"> <i id="15" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Param Sundari</span><span class="songlistplay"><span class="timestamp"> <i id="16" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Stick Together</span><span class="songlistplay"><span class="timestamp"> <i id="17" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Baby Won't You Tell Me</span><span class="songlistplay"><span class="timestamp"> <i id="18" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Naacho Naacho</span><span class="songlistplay"><span class="timestamp"> <i id="19" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Gerua</span><span class="songlistplay"><span class="timestamp"> <i id="20" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Janam Janam</span><span class="songlistplay"><span class="timestamp"> <i id="21" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Nakhre</span><span class="songlistplay"><span class="timestamp"> <i id="22" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Chan Vekhya</span><span class="songlistplay"><span class="timestamp"> <i id="23" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Abcdefu</span><span class="songlistplay"><span class="timestamp"> <i id="24" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Tigini</span><span class="songlistplay"><span class="timestamp"> <i id="25" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Teeji Seat</span><span class="songlistplay"><span class="timestamp"> <i id="26" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Aashiq Purana</span><span class="songlistplay"><span class="timestamp"> <i id="27" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">We Rollin</span><span class="songlistplay"><span class="timestamp"> <i id="28" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Industry Baby</span><span class="songlistplay"><span class="timestamp"> <i id="29" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Namdang Namsom</span><span class="songlistplay"><span class="timestamp"> <i id="30" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">On My Way x Meez</span><span class="songlistplay"><span class="timestamp"> <i id="31" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">They Don't Like It</span><span class="songlistplay"><span class="timestamp"> <i id="32" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Mera Yaar</span><span class="songlistplay"><span class="timestamp"> <i id="33" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Pehli Nazar Mein</span><span class="songlistplay"><span class="timestamp"> <i id="34" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Hue Bechain</span><span class="songlistplay"><span class="timestamp"> <i id="35" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Pal</span><span class="songlistplay"><span class="timestamp"> <i id="36" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Yaad Na Aaye</span><span class="songlistplay"><span class="timestamp"> <i id="37" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Prada</span><span class="songlistplay"><span class="timestamp"> <i id="38" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Don't Worry</span><span class="songlistplay"><span class="timestamp"> <i id="39" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Choorhey Wali Bahh</span><span class="songlistplay"><span class="timestamp"> <i id="40" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Aaj Unse Milna Hai</span><span class="songlistplay"><span class="timestamp"> <i id="41" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
<div class="songItem"><img alt="1"><span class="songName">Saat Samundar Paar</span><span class="songlistplay"><span class="timestamp"> <i id="42" class="far songItemPlay fa-2x fa-play-circle"></i></span></span></div>
</div>
</div>
<div class="songBanner"></div>
</div>
<div class="bottom">
<input type="range" name="range" id="myProgressBar" min="0" value="0" max="100">
<div class="icons">
<!-- fontawesome icons -->
<i class="fas fa-3x fa-step-backward" id="previous"></i>
<i class="far fa-3x fa-play-circle" id="masterPlay"></i>
<i class="fas fa-3x fa-step-forward" id="next"></i>
</div>
<div class="songInfo">
<img src="colnifygif.gif" width="110px" alt="" id="gif">
</div>
</div>
<script src="https://kit.fontawesome.com/a276b0cc7f.js" crossorigin="anonymous"></script>
<script>
console.log("Welcome to Cloneify");
// Initialize the Variables
let songIndex = 0;
let audioElement = new Audio('songs/1.mp3');
let masterPlay = document.getElementById('masterPlay');
let myProgressBar = document.getElementById('myProgressBar');
let gif = document.getElementById('gif');
let songItems = Array.from(document.getElementsByClassName('songItem'));
let songs = [
{songName: "Shiddat Title Track", filepath: "songs/1.mp3", coverPath: "covers/cover1.jpg"},
{songName: "Excuses", filepath: "songs/2.mp3", coverPath: "covers/cover2.jfif"},
{songName: "Habibi", filepath: "songs/3.mp3", coverPath: "covers/cover3.jpg"},
{songName: "Baaraat", filepath: "songs/4.mp3", coverPath: "covers/cover4.jfif"},
{songName: "Dil Ko Karaar Aaya", filepath: "songs/5.mp3", coverPath: "covers/cover5.jpg"},
{songName: "Soch Liya", filepath: "songs/6.mp3", coverPath: "covers/cover6.jfif"},
{songName: "Way Back Home", filepath: "songs/7.mp3", coverPath: "covers/cover7.jpg"},
{songName: "BTS-Dynamite", filepath: "songs/8.mp3", coverPath: "covers/cover8.jpg"},
{songName: "Azeri", filepath: "songs/9.mp3", coverPath: "covers/cover9.jpg"},
{songName: "High School", filepath: "songs/10.mp3", coverPath: "covers/cover10.jpg"},
{songName: "Albatraoz", filepath: "songs/11.mp3", coverPath: "covers/cover11.jpg"},
{songName: "Lovely", filepath: "songs/12.mp3", coverPath: "covers/cover12.jpg"},
{songName: "A Different Way", filepath: "songs/13.mp3", coverPath: "covers/cover13.jpg"},
{songName: "Yaadon Ki Baarat", filepath: "songs/14.mp3", coverPath: "covers/cover14.jpg"},
{songName: "Khairiyat", filepath: "songs/15.mp3", coverPath: "covers/cover15.jpg"},
{songName: "Dil Mein Ho Tum", filepath: "songs/16.mp3", coverPath: "covers/cover16.jpg"},
{songName: "Param Sundari", filepath: "songs/17.mp3", coverPath: "covers/cover17.jpg"},
{songName: "Stick Together", filepath: "songs/18.mp3", coverPath: "covers/cover18.jpg"},
{songName: "Baby Won't You Tell Me", filepath: "songs/19.mp3", coverPath: "covers/cover19.jpg"},
{songName: "Naacho Naacho", filepath: "songs/20.mp3", coverPath: "covers/cover20.jpg"},
{songName: "Gerua", filepath: "songs/21.mp3", coverPath: "covers/cover21.jpg"},
{songName: "Janam Janam", filepath: "songs/22.mp3", coverPath: "covers/cover22.jpg"},
{songName: "Nakhre", filepath: "songs/23.mp3", coverPath: "covers/cover23.jpg"},
{songName: "Chan Vekhya", filepath: "songs/24.mp3", coverPath: "covers/cover24.jpg"},
{songName: "Abcdefu", filepath: "songs/25.mp3", coverPath: "covers/cover25.jpg"},
{songName: "Tigini", filepath: "songs/26.mp3", coverPath: "covers/cover26.jpg"},
{songName: "Teeji Seat", filepath: "songs/27.mp3", coverPath: "covers/cover27.jpg"},
{songName: "Aashiq Purana", filepath: "songs/28.mp3", coverPath: "covers/cover28.jpg"},
{songName: "We Rollin", filepath: "songs/29.mp3", coverPath: "covers/cover29.jpg"},
{songName: "Industry Baby", filepath: "songs/30.mp3", coverPath: "covers/cover30.jpg"},
{songName: "Namdang Namsom", filepath: "songs/31.mp3", coverPath: "covers/cover31.jpg"},
{songName: "On My Way x Meez", filepath: "songs/32.mp3", coverPath: "covers/cover32.jpg"},
{songName: "They Don't Like It", filepath: "songs/33.mp3", coverPath: "covers/cover33.jpg"},
{songName: "Mera Yaar", filepath: "songs/34.mp3", coverPath: "covers/cover34.jpg"},
{songName: "Pehli Nazar Mein", filepath: "songs/35.mp3", coverPath: "covers/cover35.jpg"},
{songName: "Hue Bechain", filepath: "songs/36.mp3", coverPath: "covers/cover36.jpg"},
{songName: "Pal", filepath: "songs/37.mp3", coverPath: "covers/cover37.jpg"},
{songName: "Yaad Na Aaye", filepath: "songs/38.mp3", coverPath: "covers/cover38.jpg"},
{songName: "Prada", filepath: "songs/39.mp3", coverPath: "covers/cover39.jpg"},
{songName: "Don't Worry", filepath: "songs/40.mp3", coverPath: "covers/cover40.jpg"},
{songName: "Choorhey Wali Bahh", filepath: "songs/41.mp3", coverPath: "covers/cover41.jpg"},
{songName: "Aaj Unse Milna Hai", filepath: "songs/42.mp3", coverPath: "covers/cover42.jpg"},
{songName: "Saat Samundar Paar", filepath: "songs/43.mp3", coverPath: "covers/cover43.jpg"},
]
songItems.forEach((element, i)=>{
element.getElementsByTagName("img")[0].src = songs[i].coverPath;
element.getElementsByClassName("songName")[0].innerText = songs[i].songName;
})
//Handle play/pause click
masterPlay.addEventListener('click', ()=>{
if(audioElement.paused || audioElement.currentTime<=0){
audioElement.play();
masterPlay.classList.remove('fa-play-circle');
masterPlay.classList.add('fa-pause-circle');
gif.style.opacity = 1;
}
else{
audioElement.pause();
masterPlay.classList.remove('fa-pause-circle');
masterPlay.classList.add('fa-play-circle');
gif.style.opacity = 0;
}
})
// Listen to Events
audioElement.addEventListener('timeupdate', ()=>{
// Update Seekbar
progress = parseInt((audioElement.currentTime/audioElement.duration)* 100);
myProgressBar.value = progress;
})
myProgressBar.addEventListener('change', ()=>{
audioElement.currentTime = myProgressBar.value * audioElement.duration/100;
})
const makeAllPlays = ()=>{
Array.from(document.getElementsByClassName('songItemPlay')).forEach((element)=>{
element.classList.remove('fa-pause-circle');
element.classList.add('fa-play-circle');
})
}
Array.from(document.getElementsByClassName('songItemPlay')).forEach((element)=>{
element.addEventListener('click', (e)=>{
makeAllPlays();
songIndex = parseInt(e.target.id);
e.target.classList.remove('fa-play-circle');
e.target.classList.add('fa-pause-circle');
audioElement.src = `songs/${songIndex+1}.mp3`;
audioElement.currentTime = 0;
audioElement.play(songItems);
gif.style.opacity = 1;
masterPlay.classList.remove('fa-play-circle');
masterPlay.classList.add('fa-pause-circle');
})
})
document.getElementById('next').addEventListener('click', ()=>{
if(songIndex>=100){
songIndex = 0
}
else{
songIndex += 1;
}
audioElement.src = `songs/${songIndex+1}.mp3`;
audioElement.currentTime = 0;
audioElement.play(songItems);
masterPlay.classList.remove('fa-play-circle');
masterPlay.classList.add('fa-pause-circle');
})
document.getElementById('previous').addEventListener('click', ()=>{
if(songIndex<=0){
songIndex = 0
}
else{
songIndex -= 1;
}
audioElement.src = `songs/${songIndex+1}.mp3`;
audioElement.currentTime = 0;
audioElement.play(songItems);
masterPlay.classList.remove('fa-play-circle');
masterPlay.classList.add('fa-pause-circle');
})
</script>
</body>
</html>