-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
338 lines (325 loc) · 14.9 KB
/
index.html
File metadata and controls
338 lines (325 loc) · 14.9 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="title"
content="LySy - Create Synced Lyrics for Your Musics"
/>
<meta
name="description"
content="A free, open-source tool to sync lyrics with your music files in LRC format. Easy to use with live preview for music enthusiasts."
/>
<meta
name="keywords"
content="LySy, lyrics syncer, LRC generator, music lyrics, sync lyrics, open source, music tool"
/>
<meta name="author" content="pxeemo" />
<meta
name="google-site-verification"
content="-LySwkAn3NzQH2QVqQfD1hiY_QmHgMAHGkDuJ8-tA3Y"
/>
<meta
property="og:title"
content="LySy - Create Synced Lyrics for Your Musics"
/>
<meta
property="og:description"
content="Effortlessly sync lyrics to your music library with this open-source tool."
/>
<meta property="og:url" content="https://pxeemo.github.io/LySy/" />
<meta property="og:type" content="website" />
<title>Lyrics Syncer</title>
<link rel="stylesheet" href="./src/style.css" />
<link rel="icon" href="./src/assets/favicon.svg" />
<script type="module" src="./src/main.js" defer></script>
</head>
<body class="bg-zinc-900 text-zinc-200 font-vazir pb-36">
<div
class="fixed z-20 w-screen sm:h-16 h-30 bg-zinc-800 bottom-0 px-4 py-2 shadow-[0_0_6px_#111] transition-all"
>
<div
class="hidden h-full sm:flex-nowrap flex-wrap gap-4 items-center"
id="player"
>
<div class="min-w-fit sm:m-0 mx-auto">
<button
class="hover:bg-zinc-700 rounded-full w-8 h-8"
id="backwardBtn"
>
<img
src="./src/assets/fast_rewind.svg"
alt="seek backward icon"
class="mx-auto"
/>
</button>
<button
class="hover:bg-zinc-700 rounded-full w-8 h-8"
id="playPauseBtn"
>
<img
src="./src/assets/play_arrow.svg"
class="mx-auto"
alt="play icon"
/>
<img
src="./src/assets/pause.svg"
alt="pause icon"
class="hidden mx-auto"
/>
</button>
<button
class="hover:bg-zinc-700 rounded-full w-8 h-8"
id="forwardBtn"
>
<img
src="./src/assets/fast_forward.svg"
alt="song seek forward"
class="mx-auto"
/>
</button>
</div>
<select
name="playbackSpeed"
class="bg-zinc-800 text-zinc-100 sm:order-0 -order-1 sm:w-fit w-16"
id="playbackSpeed"
>
<option value="0.25">x0.25</option>
<option value="0.5">x0.5</option>
<option value="0.75">x0.75</option>
<option value="1" selected>x1</option>
<option value="1.25">x1.25</option>
<option value="1.5">x1.5</option>
</select>
<div
class="flex sm:order-0 -order-2 sm:grow min-w-full sm:min-w-0 items-center gap-2"
>
<span id="currentTime" class="min-w-10 text-end">0:00</span>
<div id="waveform" class="min-w-0 w-full"></div>
<span id="duration" class="min-w-10">0:00</span>
</div>
<button
class="hover:bg-zinc-700 rounded-full min-w-8 h-8 sm:ms-0 ms-8"
id="removeSongBtn"
>
<img
src="./src/assets/close.svg"
alt="remove song"
class="mx-auto"
/>
</button>
</div>
<div id="fileChooser" class="w-full h-full content-center">
<input type="file" name="fileInput" id="file" class="hidden" />
<label
for="file"
class="block bg-orange-400 content-center text-center font-medium mx-auto w-3/4 max-w-80 h-5/6 text-black rounded-3xl cursor-pointer"
>
Choose File
</label>
</div>
</div>
<div
class="container container-md p-4 h-[calc(100svh-3rem)] text-center"
>
<textarea
dir="auto"
class="w-full max-w-3xl h-[calc(100%-13rem)] py-3 px-4 outline-none bg-zinc-950 rounded-3xl focus:shadow-orange-400 focus:shadow-[0_0_2px_0_#fff] border-zinc-700 transition-all ease-in-out duration-300 focus:border-orange-400 border-2 resize-none"
id="lyricInput"
rows="20"
placeholder="Enter your lyric text here"
required
></textarea>
<div class="max-w-lg px-6 my-2 mx-auto">
<label
class="flex p-2 my-0.5 bg-zinc-800 rounded rounded-t-2xl cursor-pointer items-center justify-between"
for="isWordByWord"
>
<p class="ps-2 text-lg text-start">Sync word-by-word</p>
<input
class="hidden peer"
type="checkbox"
id="isWordByWord"
name="isWordByWord"
/>
<label
class="relative inline-block min-w-12 h-8 cursor-pointer border-zinc-500 border-2 bg-zinc-800 peer-checked:bg-orange-400 rounded-full duration-500 transition before:duration-50 before:ease-out before:transition-all before:absolute before:content-[''] before:bg-zinc-400 before:aspect-square before:left-1.5 before:top-1.5 before:bottom-1.5 peer-checked:before:left-4.5 peer-checked:before:bottom-0.5 peer-checked:before:top-0.5 peer-checked:border-orange-400 peer-checked:before:bg-zinc-800 before:rounded-full"
for="isWordByWord"
></label>
</label>
<label
class="flex p-2 my-0.5 bg-zinc-800 rounded cursor-pointer items-center justify-between"
for="isCharByChar"
>
<p class="ps-2 text-lg text-start">
Character-based syncing
</p>
<input
class="hidden peer"
type="checkbox"
id="isCharByChar"
name="isCharByChar"
/>
<label
class="relative inline-block min-w-12 h-8 cursor-pointer border-zinc-500 border-2 bg-zinc-800 peer-checked:bg-orange-400 rounded-full duration-500 transition before:duration-50 before:ease-out before:transition-all before:absolute before:content-[''] before:bg-zinc-400 before:aspect-square before:left-1.5 before:top-1.5 before:bottom-1.5 peer-checked:before:left-4.5 peer-checked:before:bottom-0.5 peer-checked:before:top-0.5 peer-checked:border-orange-400 peer-checked:before:bg-zinc-800 before:rounded-full"
for="isCharByChar"
></label>
</label>
<label
class="flex p-2 my-0.5 bg-zinc-800 rounded rounded-b-2xl cursor-pointer items-center justify-between"
for="isDuet"
>
<p class="ps-2 text-lg text-start">Enable duet</p>
<input
class="hidden peer"
type="checkbox"
id="isDuet"
name="isDuet"
/>
<label
class="relative inline-block min-w-12 h-8 cursor-pointer border-zinc-500 border-2 bg-zinc-800 peer-checked:bg-orange-400 rounded-full duration-500 transition before:duration-50 before:ease-out before:transition-all before:absolute before:content-[''] before:bg-zinc-400 before:aspect-square before:left-1.5 before:top-1.5 before:bottom-1.5 peer-checked:before:left-4.5 peer-checked:before:bottom-0.5 peer-checked:before:top-0.5 peer-checked:border-orange-400 peer-checked:before:bg-zinc-800 before:rounded-full"
for="isDuet"
></label>
</label>
</div>
<div class="flex gap-2 justify-center items-center">
<div class="flex gap-2 items-center">
<label for="offsetInput" class="text-zinc-300 text-sm">
Offset (ms):
</label>
<input
type="number"
id="offsetInput"
class="w-24 h-8 bg-zinc-800 text-zinc-100 border-2 border-zinc-700 rounded-lg px-2 text-center outline-none focus:border-orange-400 transition-all"
value="0"
step="10"
/>
</div>
<input type="file" name="lrcFileInput" id="lrcFile" class="hidden" accept=".lrc" />
<label
for="lrcFile"
class="h-8 bg-zinc-700 hover:bg-zinc-600 text-zinc-100 font-medium rounded-full px-5 leading-8 cursor-pointer transition-colors"
>
Upload Lyrics
</label>
<button
class="h-8 bg-orange-400 text-black font-medium rounded-full px-5"
id="plainInputParser"
>
Load
</button>
</div>
</div>
<!-- Lyrics container -->
<div
class="container container-md max-w-3xl p-4 my-28 text-center hidden"
id="syncer"
>
<ul
class="w-full text-start font-bold overflow-clip"
id="lyricList"
></ul>
<button
class="h-8 bg-orange-400 text-black font-medium rounded-full px-5 my-2"
id="dlFile"
>
Save
</button>
</div>
<!-- Floating action buttons -->
<button
class="fixed left-4 bottom-0 h-14 w-14 text-xs/3 bg-zinc-800 border-orange-400 border-1 shadow-xl/30 text-zinc-100 rounded-xl transition-all"
id="switchVocalistBtn"
>
Switch Vocalist
</button>
<button
class="fixed left-4 bottom-0 h-14 w-14 text-sm/4 bg-zinc-800 border-orange-400 border-1 shadow-xl/30 text-zinc-100 rounded-xl transition-all"
id="wordEndBtn"
>
Word End
</button>
<button
class="fixed right-4 bottom-0 h-14 w-14 bg-zinc-800 border-orange-400 border-1 shadow-2xl/30 text-zinc-100 rounded-xl transition-all delay-150"
id="prevItemBtn"
>
Back
</button>
<button
class="fixed right-4 bottom-0 h-14 w-14 font-semibold bg-orange-400 shadow-2xl/30 text-black rounded-xl transition-all"
id="nextItemBtn"
>
Next
</button>
<!-- Edit Item Modal -->
<dialog
class="backdrop:bg-black/80 m-auto p-4 rounded-lg bg-zinc-900"
id="editItemModal"
>
<form method="dialog">
<div id="editItemContent" class="text-zinc-100 mb-2">
<textarea
rows="1"
id="editItemInput"
type="text"
name="editItemInput"
dir="auto"
class="w-full min-w-80 bg-zinc-900 text-zinc-100 disabled:text-zinc-400 disabled:bg-zinc-800 outline-none rounded-md m-1 p-2 border-zinc-700 transition-all ease-in-out duration-300 focus:border-orange-400 border-2 resize-none"
></textarea>
</div>
<div class="flex flex-col gap-0.5 items-start">
<div class="px-2 text-zinc-300 rounded-full">
<input
class="accent-orange-400"
id="markAsBg"
type="checkbox"
name="markAsBg"
/>
<label class="px-1" for="markAsBg">
Mark as background vocal
</label>
</div>
<button
class="px-2 py-0.5 text-orange-400 not-disabled:hover:bg-orange-300/20 rounded-full disabled:text-gray-400 transition-colors duration-200"
id="addItemAboveBtn"
>
Add Above
</button>
<button
class="px-2 py-0.5 text-orange-400 not-disabled:hover:bg-orange-300/20 rounded-full disabled:text-gray-400 transition-colors duration-200"
id="addItemBelowBtn"
>
Add Below
</button>
<button
class="px-2 py-0.5 text-red-500 not-disabled:hover:bg-red-400/20 rounded-full transition-all duration-200"
id="editItemRemove"
>
Remove
</button>
</div>
<div class="flex justify-end">
<button
class="m-1 px-3 py-1 text-orange-400 hover:bg-orange-300/20 rounded-full transition-colors duration-200"
id="editItemCancel"
>
Cancel
</button>
<button
class="m-1 px-3 py-1 font-medium text-black bg-orange-400 rounded-full transition-colors duration-200"
id="editItemDone"
>
Save
</button>
</div>
<input
id="editItemIndex"
type="hidden"
name="editItemIndex"
value="null"
/>
</form>
</dialog>
</body>
</html>