Aynursusuz commited on
Commit
bcb2195
ยท
verified ยท
1 Parent(s): 1bbbc4a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +33 -39
index.html CHANGED
@@ -39,7 +39,6 @@
39
  font-weight: 600;
40
  text-transform: uppercase;
41
  margin-bottom: 15px;
42
- letter-spacing: 0.05em;
43
  }
44
 
45
  .category-item {
@@ -85,10 +84,6 @@
85
  padding: 30px;
86
  }
87
 
88
- .header {
89
- margin-bottom: 30px;
90
- }
91
-
92
  .header h1 {
93
  font-size: 2rem;
94
  margin-bottom: 10px;
@@ -116,7 +111,7 @@
116
  display: flex;
117
  align-items: center;
118
  gap: 15px;
119
- margin-bottom: 25px;
120
  padding-bottom: 15px;
121
  border-bottom: 2px solid #334155;
122
  }
@@ -129,7 +124,6 @@
129
  font-size: 1.75rem;
130
  color: #f1f5f9;
131
  text-transform: uppercase;
132
- letter-spacing: 0.05em;
133
  }
134
 
135
  .playlist-grid {
@@ -158,41 +152,35 @@
158
  .playlist-thumbnail {
159
  width: 100%;
160
  height: 160px;
161
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
162
  position: relative;
163
  overflow: hidden;
164
  }
165
 
166
- .playlist-thumbnail img {
167
- width: 100%;
168
- height: 100%;
169
- object-fit: cover;
170
- }
171
-
172
  .play-overlay {
173
  position: absolute;
174
  top: 50%;
175
  left: 50%;
176
  transform: translate(-50%, -50%);
177
- width: 60px;
178
- height: 60px;
179
- background: rgba(0, 0, 0, 0.7);
180
  border-radius: 50%;
181
  display: flex;
182
  align-items: center;
183
  justify-content: center;
184
  transition: all 0.3s;
 
185
  }
186
 
187
  .playlist-card:hover .play-overlay {
188
- background: rgba(255, 0, 0, 0.9);
189
- transform: translate(-50%, -50%) scale(1.1);
190
  }
191
 
192
  .play-overlay::after {
193
  content: 'โ–ถ';
194
  color: white;
195
- font-size: 24px;
196
  margin-left: 4px;
197
  }
198
 
@@ -205,17 +193,17 @@
205
  color: white;
206
  padding: 4px 10px;
207
  border-radius: 4px;
208
- font-size: 0.75rem;
209
  font-weight: 600;
210
  display: inline-block;
 
211
  }
212
 
213
  .playlist-title {
214
  color: #f1f5f9;
215
  font-weight: 600;
216
- font-size: 1rem;
217
- margin-bottom: 10px;
218
- margin-top: 10px;
219
  }
220
 
221
  .playlist-meta {
@@ -223,7 +211,7 @@
223
  align-items: center;
224
  gap: 10px;
225
  font-size: 0.85rem;
226
- color: #94a3b8;
227
  }
228
 
229
  .loading {
@@ -288,6 +276,23 @@
288
  let allData = null;
289
  let currentCategory = null;
290
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  async function loadData() {
292
  try {
293
  const response = await fetch('playlists.json');
@@ -326,17 +331,9 @@
326
 
327
  content.innerHTML = '<div class="category-header"><span class="icon">' + category.icon + '</span><h2>' + category.name + '</h2></div><div class="playlist-grid">' +
328
  category.playlists.map((pl, index) => {
329
- const playlistId = extractPlaylistId(pl.url);
330
- const thumbnailUrl = 'https://img.youtube.com/vi/' + playlistId.substring(2, 13) + '/mqdefault.jpg';
331
- const fallbackUrl = 'https://via.placeholder.com/320x180/667eea/ffffff?text=' + encodeURIComponent(pl.title);
332
- return '<a href="' + pl.url + '" target="_blank" class="playlist-card"><div class="playlist-thumbnail"><img src="' + thumbnailUrl + '" alt="' + pl.title + '" onerror="this.src=\'' + fallbackUrl + '\'"><div class="play-overlay"></div></div><div class="playlist-info"><div class="youtube-badge">โ–ถ YOUTUBE</div><div class="playlist-title">' + pl.title + '</div><div class="playlist-meta"><span>๐Ÿ“… ' + today + '</span></div></div></a>';
333
  }).join('') + '</div>';
334
  }
335
-
336
- function extractPlaylistId(url) {
337
- const match = url.match(/[?&]list=([^&]+)/);
338
- return match ? match[1] : '';
339
- }
340
 
341
  document.addEventListener('DOMContentLoaded', () => {
342
  const searchBar = document.getElementById('searchBar');
@@ -364,11 +361,8 @@
364
  content.innerHTML = '<div style="text-align: center; padding: 50px; color: #94a3b8;">No results found</div>';
365
  } else {
366
  content.innerHTML = '<div class="category-header"><span class="icon">๐Ÿ”</span><h2>Search Results (' + results.length + ')</h2></div><div class="playlist-grid">' +
367
- results.map(result => {
368
- const playlistId = extractPlaylistId(result.url);
369
- const thumbnailUrl = 'https://img.youtube.com/vi/' + playlistId.substring(2, 13) + '/mqdefault.jpg';
370
- const fallbackUrl = 'https://via.placeholder.com/320x180/667eea/ffffff?text=' + encodeURIComponent(result.title);
371
- return '<a href="' + result.url + '" target="_blank" class="playlist-card"><div class="playlist-thumbnail"><img src="' + thumbnailUrl + '" alt="' + result.title + '" onerror="this.src=\'' + fallbackUrl + '\'"><div class="play-overlay"></div></div><div class="playlist-info"><div class="youtube-badge">โ–ถ YOUTUBE</div><div class="playlist-title">' + result.title + '</div><div class="playlist-meta"><span>' + result.category.icon + ' ' + result.category.name + '</span><span>๐Ÿ“… ' + today + '</span></div></div></a>';
372
  }).join('') + '</div>';
373
  }
374
  });
 
39
  font-weight: 600;
40
  text-transform: uppercase;
41
  margin-bottom: 15px;
 
42
  }
43
 
44
  .category-item {
 
84
  padding: 30px;
85
  }
86
 
 
 
 
 
87
  .header h1 {
88
  font-size: 2rem;
89
  margin-bottom: 10px;
 
111
  display: flex;
112
  align-items: center;
113
  gap: 15px;
114
+ margin: 30px 0 25px;
115
  padding-bottom: 15px;
116
  border-bottom: 2px solid #334155;
117
  }
 
124
  font-size: 1.75rem;
125
  color: #f1f5f9;
126
  text-transform: uppercase;
 
127
  }
128
 
129
  .playlist-grid {
 
152
  .playlist-thumbnail {
153
  width: 100%;
154
  height: 160px;
 
155
  position: relative;
156
  overflow: hidden;
157
  }
158
 
 
 
 
 
 
 
159
  .play-overlay {
160
  position: absolute;
161
  top: 50%;
162
  left: 50%;
163
  transform: translate(-50%, -50%);
164
+ width: 70px;
165
+ height: 70px;
166
+ background: rgba(255, 0, 0, 0.9);
167
  border-radius: 50%;
168
  display: flex;
169
  align-items: center;
170
  justify-content: center;
171
  transition: all 0.3s;
172
+ z-index: 10;
173
  }
174
 
175
  .playlist-card:hover .play-overlay {
176
+ transform: translate(-50%, -50%) scale(1.15);
177
+ box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
178
  }
179
 
180
  .play-overlay::after {
181
  content: 'โ–ถ';
182
  color: white;
183
+ font-size: 28px;
184
  margin-left: 4px;
185
  }
186
 
 
193
  color: white;
194
  padding: 4px 10px;
195
  border-radius: 4px;
196
+ font-size: 0.7rem;
197
  font-weight: 600;
198
  display: inline-block;
199
+ margin-bottom: 10px;
200
  }
201
 
202
  .playlist-title {
203
  color: #f1f5f9;
204
  font-weight: 600;
205
+ font-size: 1.05rem;
206
+ margin-bottom: 8px;
 
207
  }
208
 
209
  .playlist-meta {
 
211
  align-items: center;
212
  gap: 10px;
213
  font-size: 0.85rem;
214
+ color: #64748b;
215
  }
216
 
217
  .loading {
 
276
  let allData = null;
277
  let currentCategory = null;
278
 
279
+ const gradients = [
280
+ 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
281
+ 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
282
+ 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
283
+ 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)',
284
+ 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)',
285
+ 'linear-gradient(135deg, #30cfd0 0%, #330867 100%)',
286
+ 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)',
287
+ 'linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%)',
288
+ 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)',
289
+ 'linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%)'
290
+ ];
291
+
292
+ function getGradient(index) {
293
+ return gradients[index % gradients.length];
294
+ }
295
+
296
  async function loadData() {
297
  try {
298
  const response = await fetch('playlists.json');
 
331
 
332
  content.innerHTML = '<div class="category-header"><span class="icon">' + category.icon + '</span><h2>' + category.name + '</h2></div><div class="playlist-grid">' +
333
  category.playlists.map((pl, index) => {
334
+ return '<a href="' + pl.url + '" target="_blank" class="playlist-card"><div class="playlist-thumbnail" style="background: ' + getGradient(index) + ';"><div class="play-overlay"></div></div><div class="playlist-info"><div class="youtube-badge">โ–ถ YOUTUBE</div><div class="playlist-title">' + pl.title + '</div><div class="playlist-meta"><span>๐Ÿ“… ' + today + '</span></div></div></a>';
 
 
 
335
  }).join('') + '</div>';
336
  }
 
 
 
 
 
337
 
338
  document.addEventListener('DOMContentLoaded', () => {
339
  const searchBar = document.getElementById('searchBar');
 
361
  content.innerHTML = '<div style="text-align: center; padding: 50px; color: #94a3b8;">No results found</div>';
362
  } else {
363
  content.innerHTML = '<div class="category-header"><span class="icon">๐Ÿ”</span><h2>Search Results (' + results.length + ')</h2></div><div class="playlist-grid">' +
364
+ results.map((result, index) => {
365
+ return '<a href="' + result.url + '" target="_blank" class="playlist-card"><div class="playlist-thumbnail" style="background: ' + getGradient(index) + ';"><div class="play-overlay"></div></div><div class="playlist-info"><div class="youtube-badge">โ–ถ YOUTUBE</div><div class="playlist-title">' + result.title + '</div><div class="playlist-meta"><span>' + result.category.icon + ' ' + result.category.name + '</span><span>๐Ÿ“… ' + today + '</span></div></div></a>';
 
 
 
366
  }).join('') + '</div>';
367
  }
368
  });