steake commited on
Commit
3a03d45
·
verified ·
1 Parent(s): 8196c80

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +567 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Spotify Lyrics Translate
3
- emoji: 🔥
4
- colorFrom: purple
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: spotify-lyrics-translate
3
+ emoji: 🐳
4
+ colorFrom: green
5
+ colorTo: pink
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,567 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>LyricSync - Spotify Karaoke Player</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
11
+
12
+ body {
13
+ font-family: 'Poppins', sans-serif;
14
+ background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
15
+ color: #fff;
16
+ min-height: 100vh;
17
+ }
18
+
19
+ .lyric-line {
20
+ transition: all 0.3s ease;
21
+ line-height: 2.5;
22
+ }
23
+
24
+ .lyric-line.active {
25
+ color: #1DB954;
26
+ font-size: 1.5rem;
27
+ font-weight: 600;
28
+ text-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
29
+ }
30
+
31
+ .progress-bar {
32
+ height: 4px;
33
+ background: rgba(255, 255, 255, 0.2);
34
+ border-radius: 2px;
35
+ }
36
+
37
+ .progress-fill {
38
+ height: 100%;
39
+ background: #1DB954;
40
+ border-radius: 2px;
41
+ transition: width 0.1s linear;
42
+ }
43
+
44
+ .volume-slider::-webkit-slider-thumb {
45
+ -webkit-appearance: none;
46
+ width: 16px;
47
+ height: 16px;
48
+ background: #1DB954;
49
+ border-radius: 50%;
50
+ cursor: pointer;
51
+ }
52
+
53
+ .playlist-item:hover {
54
+ background: rgba(255, 255, 255, 0.1);
55
+ }
56
+
57
+ .blur-bg {
58
+ background: rgba(0, 0, 0, 0.5);
59
+ backdrop-filter: blur(10px);
60
+ }
61
+
62
+ .language-option:hover {
63
+ background: rgba(29, 185, 84, 0.2);
64
+ }
65
+
66
+ @keyframes pulse {
67
+ 0% { transform: scale(1); }
68
+ 50% { transform: scale(1.05); }
69
+ 100% { transform: scale(1); }
70
+ }
71
+
72
+ .pulse-animation {
73
+ animation: pulse 2s infinite;
74
+ }
75
+ </style>
76
+ </head>
77
+ <body class="flex flex-col">
78
+ <!-- Main Container -->
79
+ <div class="flex flex-col md:flex-row flex-1 overflow-hidden">
80
+ <!-- Sidebar -->
81
+ <div class="w-full md:w-64 bg-black bg-opacity-30 p-4 flex flex-col">
82
+ <div class="mb-8">
83
+ <h1 class="text-2xl font-bold text-white flex items-center">
84
+ <i class="fas fa-music text-green-500 mr-2"></i>
85
+ LyricSync
86
+ </h1>
87
+ <p class="text-gray-400 text-sm">Your Spotify Karaoke Experience</p>
88
+ </div>
89
+
90
+ <nav class="mb-8">
91
+ <ul class="space-y-2">
92
+ <li>
93
+ <a href="#" class="flex items-center px-3 py-2 rounded text-white bg-green-900 bg-opacity-30">
94
+ <i class="fas fa-home mr-3"></i> Home
95
+ </a>
96
+ </li>
97
+ <li>
98
+ <a href="#" class="flex items-center px-3 py-2 rounded text-gray-400 hover:text-white hover:bg-gray-800">
99
+ <i class="fas fa-search mr-3"></i> Search
100
+ </a>
101
+ </li>
102
+ <li>
103
+ <a href="#" class="flex items-center px-3 py-2 rounded text-gray-400 hover:text-white hover:bg-gray-800">
104
+ <i class="fas fa-book mr-3"></i> Your Library
105
+ </a>
106
+ </li>
107
+ </ul>
108
+ </nav>
109
+
110
+ <div class="mb-8">
111
+ <div class="flex items-center justify-between mb-4">
112
+ <h2 class="text-gray-400 uppercase text-xs font-bold tracking-wider">Playlists</h2>
113
+ <button class="text-gray-400 hover:text-white">
114
+ <i class="fas fa-plus"></i>
115
+ </button>
116
+ </div>
117
+ <ul class="space-y-2">
118
+ <li>
119
+ <a href="#" class="flex items-center px-3 py-2 rounded text-gray-400 hover:text-white hover:bg-gray-800">
120
+ <i class="fas fa-heart mr-3 text-green-500"></i> Liked Songs
121
+ </a>
122
+ </li>
123
+ <li>
124
+ <a href="#" class="flex items-center px-3 py-2 rounded text-gray-400 hover:text-white hover:bg-gray-800">
125
+ <i class="fas fa-clock mr-3"></i> Recently Played
126
+ </a>
127
+ </li>
128
+ <li>
129
+ <a href="#" class="flex items-center px-3 py-2 rounded text-gray-400 hover:text-white hover:bg-gray-800">
130
+ <i class="fas fa-list mr-3"></i> Discover Weekly
131
+ </a>
132
+ </li>
133
+ </ul>
134
+ </div>
135
+
136
+ <div class="mt-auto">
137
+ <button id="loginBtn" class="w-full bg-green-500 hover:bg-green-600 text-white py-2 px-4 rounded-full font-medium flex items-center justify-center">
138
+ <i class="fab fa-spotify mr-2"></i> Connect Spotify
139
+ </button>
140
+ </div>
141
+ </div>
142
+
143
+ <!-- Main Content -->
144
+ <div class="flex-1 flex flex-col overflow-hidden">
145
+ <!-- Top Navigation -->
146
+ <div class="p-4 flex justify-between items-center blur-bg">
147
+ <div class="flex space-x-4">
148
+ <button class="w-8 h-8 rounded-full bg-black bg-opacity-40 flex items-center justify-center hover:bg-opacity-60">
149
+ <i class="fas fa-chevron-left"></i>
150
+ </button>
151
+ <button class="w-8 h-8 rounded-full bg-black bg-opacity-40 flex items-center justify-center hover:bg-opacity-60">
152
+ <i class="fas fa-chevron-right"></i>
153
+ </button>
154
+ </div>
155
+
156
+ <div class="flex items-center space-x-4">
157
+ <div class="relative group">
158
+ <button class="flex items-center space-x-2 bg-black bg-opacity-60 hover:bg-opacity-80 px-4 py-1 rounded-full">
159
+ <span class="text-sm font-medium">Premium Required</span>
160
+ <i class="fas fa-crown text-yellow-400"></i>
161
+ </button>
162
+ <div class="absolute right-0 mt-2 w-64 bg-gray-800 rounded-md shadow-lg z-10 hidden group-hover:block p-2">
163
+ <p class="text-sm text-gray-300 p-2">Full playback features require Spotify Premium account.</p>
164
+ </div>
165
+ </div>
166
+
167
+ <div class="relative group">
168
+ <button class="w-8 h-8 rounded-full bg-gray-700 flex items-center justify-center overflow-hidden">
169
+ <i class="fas fa-user"></i>
170
+ </button>
171
+ <div class="absolute right-0 mt-2 w-48 bg-gray-800 rounded-md shadow-lg z-10 hidden group-hover:block">
172
+ <a href="#" class="block px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">Account</a>
173
+ <a href="#" class="block px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">Settings</a>
174
+ <a href="#" class="block px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">Log out</a>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <!-- Content Area -->
181
+ <div class="flex-1 overflow-y-auto p-6">
182
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
183
+ <!-- Playlists Section -->
184
+ <div class="lg:col-span-1 bg-gray-800 bg-opacity-40 rounded-xl p-4">
185
+ <h2 class="text-xl font-bold mb-4">Your Library</h2>
186
+
187
+ <div class="mb-6">
188
+ <h3 class="text-sm font-semibold text-gray-400 mb-2">RECENTLY PLAYED</h3>
189
+ <div class="space-y-2">
190
+ <div class="playlist-item flex items-center p-2 rounded cursor-pointer">
191
+ <div class="w-12 h-12 bg-gray-700 rounded mr-3 overflow-hidden">
192
+ <img src="https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228" class="w-full h-full object-cover">
193
+ </div>
194
+ <div>
195
+ <h4 class="font-medium">Blinding Lights</h4>
196
+ <p class="text-xs text-gray-400">The Weeknd</p>
197
+ </div>
198
+ </div>
199
+ <div class="playlist-item flex items-center p-2 rounded cursor-pointer">
200
+ <div class="w-12 h-12 bg-gray-700 rounded mr-3 overflow-hidden">
201
+ <img src="https://i.scdn.co/image/ab67616d00001e02663a67c2591b8e2316140f05" class="w-full h-full object-cover">
202
+ </div>
203
+ <div>
204
+ <h4 class="font-medium">Save Your Tears</h4>
205
+ <p class="text-xs text-gray-400">The Weeknd</p>
206
+ </div>
207
+ </div>
208
+ <div class="playlist-item flex items-center p-2 rounded cursor-pointer">
209
+ <div class="w-12 h-12 bg-gray-700 rounded mr-3 overflow-hidden">
210
+ <img src="https://i.scdn.co/image/ab67616d00001e02d5f788c3b3c4e5a87d327d26" class="w-full h-full object-cover">
211
+ </div>
212
+ <div>
213
+ <h4 class="font-medium">Levitating</h4>
214
+ <p class="text-xs text-gray-400">Dua Lipa</p>
215
+ </div>
216
+ </div>
217
+ </div>
218
+ </div>
219
+
220
+ <div>
221
+ <h3 class="text-sm font-semibold text-gray-400 mb-2">YOUR PLAYLISTS</h3>
222
+ <div class="space-y-2">
223
+ <div class="playlist-item flex items-center p-2 rounded cursor-pointer">
224
+ <div class="w-12 h-12 bg-gradient-to-br from-purple-500 to-blue-500 rounded mr-3 flex items-center justify-center">
225
+ <i class="fas fa-heart text-white"></i>
226
+ </div>
227
+ <div>
228
+ <h4 class="font-medium">Liked Songs</h4>
229
+ <p class="text-xs text-gray-400">Playlist • 127 songs</p>
230
+ </div>
231
+ </div>
232
+ <div class="playlist-item flex items-center p-2 rounded cursor-pointer">
233
+ <div class="w-12 h-12 bg-gradient-to-br from-green-500 to-blue-500 rounded mr-3 flex items-center justify-center">
234
+ <i class="fas fa-clock text-white"></i>
235
+ </div>
236
+ <div>
237
+ <h4 class="font-medium">Recently Played</h4>
238
+ <p class="text-xs text-gray-400">Playlist • 50 songs</p>
239
+ </div>
240
+ </div>
241
+ <div class="playlist-item flex items-center p-2 rounded cursor-pointer">
242
+ <div class="w-12 h-12 bg-gradient-to-br from-yellow-500 to-red-500 rounded mr-3 flex items-center justify-center">
243
+ <i class="fas fa-list text-white"></i>
244
+ </div>
245
+ <div>
246
+ <h4 class="font-medium">Discover Weekly</h4>
247
+ <p class="text-xs text-gray-400">Playlist • 30 songs</p>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ </div>
253
+
254
+ <!-- Lyrics Section -->
255
+ <div class="lg:col-span-2 bg-gray-800 bg-opacity-40 rounded-xl p-6">
256
+ <div class="flex justify-between items-center mb-6">
257
+ <div>
258
+ <h2 class="text-2xl font-bold">Blinding Lights</h2>
259
+ <p class="text-gray-400">The Weeknd • After Hours • 2020</p>
260
+ </div>
261
+
262
+ <div class="flex space-x-3">
263
+ <button class="w-10 h-10 rounded-full bg-gray-700 hover:bg-gray-600 flex items-center justify-center">
264
+ <i class="fas fa-random"></i>
265
+ </button>
266
+ <button class="w-10 h-10 rounded-full bg-gray-700 hover:bg-gray-600 flex items-center justify-center">
267
+ <i class="fas fa-step-backward"></i>
268
+ </button>
269
+ <button id="playBtn" class="w-10 h-10 rounded-full bg-green-500 hover:bg-green-600 flex items-center justify-center">
270
+ <i class="fas fa-play"></i>
271
+ </button>
272
+ <button class="w-10 h-10 rounded-full bg-gray-700 hover:bg-gray-600 flex items-center justify-center">
273
+ <i class="fas fa-step-forward"></i>
274
+ </button>
275
+ <button class="w-10 h-10 rounded-full bg-gray-700 hover:bg-gray-600 flex items-center justify-center">
276
+ <i class="fas fa-redo"></i>
277
+ </button>
278
+ </div>
279
+ </div>
280
+
281
+ <div class="mb-6">
282
+ <div class="progress-bar mb-1">
283
+ <div id="progressFill" class="progress-fill" style="width: 35%"></div>
284
+ </div>
285
+ <div class="flex justify-between text-xs text-gray-400">
286
+ <span id="currentTime">2:15</span>
287
+ <span id="duration">3:20</span>
288
+ </div>
289
+ </div>
290
+
291
+ <div class="flex justify-between items-center mb-6">
292
+ <div class="flex items-center space-x-2">
293
+ <i class="fas fa-volume-up text-gray-400"></i>
294
+ <input type="range" min="0" max="100" value="70" class="volume-slider w-24">
295
+ </div>
296
+
297
+ <div class="relative group">
298
+ <button id="translateBtn" class="flex items-center space-x-2 bg-gray-700 hover:bg-gray-600 px-4 py-2 rounded-full">
299
+ <i class="fas fa-language"></i>
300
+ <span>Translate</span>
301
+ </button>
302
+ <div id="languageDropdown" class="absolute right-0 mt-2 w-48 bg-gray-800 rounded-md shadow-lg z-10 hidden">
303
+ <div class="p-2">
304
+ <h4 class="text-xs text-gray-400 px-2 py-1">Select Language</h4>
305
+ <div class="language-option px-3 py-2 text-sm cursor-pointer rounded" data-lang="es">Spanish</div>
306
+ <div class="language-option px-3 py-2 text-sm cursor-pointer rounded" data-lang="fr">French</div>
307
+ <div class="language-option px-3 py-2 text-sm cursor-pointer rounded" data-lang="de">German</div>
308
+ <div class="language-option px-3 py-2 text-sm cursor-pointer rounded" data-lang="it">Italian</div>
309
+ <div class="language-option px-3 py-2 text-sm cursor-pointer rounded" data-lang="ja">Japanese</div>
310
+ </div>
311
+ </div>
312
+ </div>
313
+ </div>
314
+
315
+ <div class="lyrics-container h-96 overflow-y-auto p-4 rounded-lg bg-black bg-opacity-20">
316
+ <div id="originalLyrics" class="text-center space-y-4">
317
+ <div class="lyric-line" data-time="5.2">I been tryna call</div>
318
+ <div class="lyric-line" data-time="8.5">I been on my own for long enough</div>
319
+ <div class="lyric-line" data-time="12.1">Maybe you can show me how to love, maybe</div>
320
+ <div class="lyric-line" data-time="16.8">I'm going through withdrawals</div>
321
+ <div class="lyric-line" data-time="20.3">You don't even have to do too much</div>
322
+ <div class="lyric-line" data-time="24.0">You can turn me on with just a touch, baby</div>
323
+ <div class="lyric-line" data-time="28.5">I look around and Sin City's cold and empty (Oh)</div>
324
+ <div class="lyric-line" data-time="33.2">No one's around to judge me (Oh)</div>
325
+ <div class="lyric-line" data-time="36.8">I can't see clearly when you're gone</div>
326
+ <div class="lyric-line" data-time="41.5">I said, ooh, I'm blinded by the lights</div>
327
+ <div class="lyric-line active pulse-animation" data-time="45.0">No, I can't sleep until I feel your touch</div>
328
+ <div class="lyric-line" data-time="49.7">I said, ooh, I'm drowning in the night</div>
329
+ <div class="lyric-line" data-time="53.2">Oh, when I'm like this, you're the one I trust</div>
330
+ </div>
331
+
332
+ <div id="translatedLyrics" class="text-center space-y-4 mt-8 hidden">
333
+ <div class="lyric-line" data-time="5.2">He estado intentando llamar</div>
334
+ <div class="lyric-line" data-time="8.5">He estado solo por suficiente tiempo</div>
335
+ <div class="lyric-line" data-time="12.1">Quizás puedas mostrarme cómo amar, quizás</div>
336
+ <div class="lyric-line" data-time="16.8">Estoy pasando por la abstinencia</div>
337
+ <div class="lyric-line" data-time="20.3">Ni siquiera tienes que hacer mucho</div>
338
+ <div class="lyric-line" data-time="24.0">Puedes excitarme con solo un toque, cariño</div>
339
+ <div class="lyric-line" data-time="28.5">Miro alrededor y Sin City está fría y vacía (Oh)</div>
340
+ <div class="lyric-line" data-time="33.2">No hay nadie alrededor para juzgarme (Oh)</div>
341
+ <div class="lyric-line" data-time="36.8">No puedo ver claramente cuando te has ido</div>
342
+ <div class="lyric-line" data-time="41.5">Dije, ooh, estoy cegado por las luces</div>
343
+ <div class="lyric-line" data-time="45.0">No, no puedo dormir hasta sentir tu toque</div>
344
+ <div class="lyric-line" data-time="49.7">Dije, ooh, me estoy ahogando en la noche</div>
345
+ <div class="lyric-line" data-time="53.2">Oh, cuando estoy así, eres en quien confío</div>
346
+ </div>
347
+ </div>
348
+ </div>
349
+ </div>
350
+ </div>
351
+ </div>
352
+ </div>
353
+
354
+ <!-- Player Bar (Fixed at bottom) -->
355
+ <div class="h-20 bg-gray-900 border-t border-gray-800 flex items-center px-4">
356
+ <div class="flex items-center w-1/4">
357
+ <div class="w-14 h-14 bg-gray-800 rounded mr-3 overflow-hidden">
358
+ <img src="https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228" class="w-full h-full object-cover">
359
+ </div>
360
+ <div>
361
+ <h4 class="font-medium">Blinding Lights</h4>
362
+ <p class="text-xs text-gray-400">The Weeknd</p>
363
+ </div>
364
+ <button class="ml-4 text-gray-400 hover:text-white">
365
+ <i class="far fa-heart"></i>
366
+ </button>
367
+ </div>
368
+
369
+ <div class="flex-1 flex flex-col items-center">
370
+ <div class="flex space-x-4 mb-2">
371
+ <button class="text-gray-400 hover:text-white">
372
+ <i class="fas fa-random"></i>
373
+ </button>
374
+ <button class="text-gray-400 hover:text-white">
375
+ <i class="fas fa-step-backward"></i>
376
+ </button>
377
+ <button class="w-8 h-8 rounded-full bg-white flex items-center justify-center hover:scale-105">
378
+ <i class="fas fa-pause text-black"></i>
379
+ </button>
380
+ <button class="text-gray-400 hover:text-white">
381
+ <i class="fas fa-step-forward"></i>
382
+ </button>
383
+ <button class="text-gray-400 hover:text-white">
384
+ <i class="fas fa-redo"></i>
385
+ </button>
386
+ </div>
387
+ <div class="w-full flex items-center">
388
+ <span class="text-xs text-gray-400 mr-2">2:15</span>
389
+ <div class="progress-bar flex-1">
390
+ <div class="progress-fill" style="width: 35%"></div>
391
+ </div>
392
+ <span class="text-xs text-gray-400 ml-2">3:20</span>
393
+ </div>
394
+ </div>
395
+
396
+ <div class="w-1/4 flex justify-end items-center space-x-3">
397
+ <button class="text-gray-400 hover:text-white">
398
+ <i class="fas fa-list"></i>
399
+ </button>
400
+ <button class="text-gray-400 hover:text-white">
401
+ <i class="fas fa-laptop"></i>
402
+ </button>
403
+ <div class="flex items-center">
404
+ <i class="fas fa-volume-down text-gray-400 mr-2"></i>
405
+ <input type="range" min="0" max="100" value="70" class="volume-slider w-24">
406
+ </div>
407
+ </div>
408
+ </div>
409
+
410
+ <script>
411
+ // Simulate Spotify login
412
+ document.getElementById('loginBtn').addEventListener('click', function() {
413
+ this.innerHTML = '<i class="fab fa-spotify mr-2"></i> Connected';
414
+ this.classList.remove('bg-green-500', 'hover:bg-green-600');
415
+ this.classList.add('bg-gray-700', 'hover:bg-gray-600');
416
+
417
+ // Show success notification
418
+ const notification = document.createElement('div');
419
+ notification.className = 'fixed bottom-24 right-6 bg-green-500 text-white px-4 py-2 rounded-lg shadow-lg flex items-center';
420
+ notification.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Successfully connected to Spotify';
421
+ document.body.appendChild(notification);
422
+
423
+ setTimeout(() => {
424
+ notification.remove();
425
+ }, 3000);
426
+ });
427
+
428
+ // Play/Pause button functionality
429
+ const playBtn = document.getElementById('playBtn');
430
+ let isPlaying = false;
431
+
432
+ playBtn.addEventListener('click', function() {
433
+ isPlaying = !isPlaying;
434
+
435
+ if (isPlaying) {
436
+ this.innerHTML = '<i class="fas fa-pause"></i>';
437
+ this.classList.add('pulse-animation');
438
+ startLyricsSync();
439
+ } else {
440
+ this.innerHTML = '<i class="fas fa-play"></i>';
441
+ this.classList.remove('pulse-animation');
442
+ stopLyricsSync();
443
+ }
444
+ });
445
+
446
+ // Lyrics synchronization
447
+ let lyricsInterval;
448
+ let currentTime = 135; // 2:15 in seconds
449
+ const duration = 200; // 3:20 in seconds
450
+
451
+ function startLyricsSync() {
452
+ const progressFill = document.getElementById('progressFill');
453
+ const currentTimeEl = document.getElementById('currentTime');
454
+
455
+ lyricsInterval = setInterval(() => {
456
+ currentTime += 1;
457
+
458
+ // Update progress bar
459
+ const progressPercent = (currentTime / duration) * 100;
460
+ progressFill.style.width = `${progressPercent}%`;
461
+
462
+ // Update time display
463
+ const minutes = Math.floor(currentTime / 60);
464
+ const seconds = Math.floor(currentTime % 60).toString().padStart(2, '0');
465
+ currentTimeEl.textContent = `${minutes}:${seconds}`;
466
+
467
+ // Highlight current lyric line
468
+ highlightCurrentLyric(currentTime);
469
+ }, 1000);
470
+ }
471
+
472
+ function stopLyricsSync() {
473
+ clearInterval(lyricsInterval);
474
+ }
475
+
476
+ function highlightCurrentLyric(currentTime) {
477
+ const lyricLines = document.querySelectorAll('.lyric-line');
478
+ let activeLineFound = false;
479
+
480
+ lyricLines.forEach(line => {
481
+ line.classList.remove('active', 'pulse-animation');
482
+
483
+ const lineTime = parseFloat(line.getAttribute('data-time'));
484
+
485
+ if (!activeLineFound && currentTime >= lineTime) {
486
+ line.classList.add('active');
487
+
488
+ // Only add pulse animation to the most recent line
489
+ if (currentTime - lineTime < 2) {
490
+ line.classList.add('pulse-animation');
491
+ }
492
+
493
+ // Scroll to the active line
494
+ if (currentTime - lineTime < 1) {
495
+ line.scrollIntoView({ behavior: 'smooth', block: 'center' });
496
+ }
497
+ }
498
+
499
+ if (currentTime < lineTime) {
500
+ activeLineFound = true;
501
+ }
502
+ });
503
+ }
504
+
505
+ // Translation functionality
506
+ const translateBtn = document.getElementById('translateBtn');
507
+ const languageDropdown = document.getElementById('languageDropdown');
508
+ const originalLyrics = document.getElementById('originalLyrics');
509
+ const translatedLyrics = document.getElementById('translatedLyrics');
510
+
511
+ translateBtn.addEventListener('click', function() {
512
+ languageDropdown.classList.toggle('hidden');
513
+ });
514
+
515
+ document.querySelectorAll('.language-option').forEach(option => {
516
+ option.addEventListener('click', function() {
517
+ const lang = this.getAttribute('data-lang');
518
+
519
+ // Change button text
520
+ translateBtn.innerHTML = `<i class="fas fa-language"></i> ${this.textContent}`;
521
+
522
+ // Show loading state
523
+ translatedLyrics.innerHTML = '<div class="text-center py-10"><i class="fas fa-spinner fa-spin text-2xl text-green-500"></i><p class="mt-2 text-gray-400">Translating lyrics...</p></div>';
524
+ translatedLyrics.classList.remove('hidden');
525
+
526
+ // Simulate API call delay
527
+ setTimeout(() => {
528
+ // Show translated lyrics (in a real app, this would come from an API)
529
+ translatedLyrics.innerHTML = `
530
+ <div class="lyric-line" data-time="5.2">He estado intentando llamar</div>
531
+ <div class="lyric-line" data-time="8.5">He estado solo por suficiente tiempo</div>
532
+ <div class="lyric-line" data-time="12.1">Quizás puedas mostrarme cómo amar, quizás</div>
533
+ <div class="lyric-line" data-time="16.8">Estoy pasando por la abstinencia</div>
534
+ <div class="lyric-line" data-time="20.3">Ni siquiera tienes que hacer mucho</div>
535
+ <div class="lyric-line" data-time="24.0">Puedes excitarme con solo un toque, cariño</div>
536
+ <div class="lyric-line" data-time="28.5">Miro alrededor y Sin City está fría y vacía (Oh)</div>
537
+ <div class="lyric-line" data-time="33.2">No hay nadie alrededor para juzgarme (Oh)</div>
538
+ <div class="lyric-line" data-time="36.8">No puedo ver claramente cuando te has ido</div>
539
+ <div class="lyric-line" data-time="41.5">Dije, ooh, estoy cegado por las luces</div>
540
+ <div class="lyric-line" data-time="45.0">No, no puedo dormir hasta sentir tu toque</div>
541
+ <div class="lyric-line" data-time="49.7">Dije, ooh, me estoy ahogando en la noche</div>
542
+ <div class="lyric-line" data-time="53.2">Oh, cuando estoy así, eres en quien confío</div>
543
+ `;
544
+
545
+ // Hide dropdown
546
+ languageDropdown.classList.add('hidden');
547
+
548
+ // If currently playing, sync the translated lyrics too
549
+ if (isPlaying) {
550
+ highlightCurrentLyric(currentTime);
551
+ }
552
+ }, 1500);
553
+ });
554
+ });
555
+
556
+ // Close dropdown when clicking outside
557
+ document.addEventListener('click', function(event) {
558
+ if (!translateBtn.contains(event.target) && !languageDropdown.contains(event.target)) {
559
+ languageDropdown.classList.add('hidden');
560
+ }
561
+ });
562
+
563
+ // Initialize with first lyric highlighted
564
+ highlightCurrentLyric(currentTime);
565
+ </script>
566
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=steake/spotify-lyrics-translate" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
567
+ </html>