Spaces:
Running
Running
Update index.html
Browse files- index.html +170 -94
index.html
CHANGED
|
@@ -12,9 +12,9 @@
|
|
| 12 |
}
|
| 13 |
|
| 14 |
body {
|
| 15 |
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 16 |
-
background: #
|
| 17 |
-
color: #
|
| 18 |
min-height: 100vh;
|
| 19 |
}
|
| 20 |
|
|
@@ -24,215 +24,283 @@
|
|
| 24 |
}
|
| 25 |
|
| 26 |
.sidebar {
|
| 27 |
-
width:
|
| 28 |
-
background: #
|
| 29 |
-
padding:
|
| 30 |
-
border-right: 1px solid #
|
| 31 |
position: fixed;
|
| 32 |
height: 100vh;
|
| 33 |
overflow-y: auto;
|
| 34 |
}
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
.sidebar h3 {
|
| 37 |
-
color: #
|
| 38 |
-
font-size: 0.
|
| 39 |
font-weight: 600;
|
| 40 |
text-transform: uppercase;
|
| 41 |
-
|
|
|
|
| 42 |
}
|
| 43 |
|
| 44 |
.category-item {
|
| 45 |
-
padding:
|
| 46 |
-
margin-bottom:
|
| 47 |
border-radius: 8px;
|
| 48 |
cursor: pointer;
|
| 49 |
-
transition: all 0.2s;
|
| 50 |
display: flex;
|
| 51 |
align-items: center;
|
| 52 |
justify-content: space-between;
|
|
|
|
| 53 |
}
|
| 54 |
|
| 55 |
.category-item:hover {
|
| 56 |
-
background: #
|
| 57 |
}
|
| 58 |
|
| 59 |
.category-item.active {
|
| 60 |
-
background: #
|
| 61 |
color: white;
|
| 62 |
}
|
| 63 |
|
| 64 |
.category-name {
|
| 65 |
display: flex;
|
| 66 |
align-items: center;
|
| 67 |
-
gap:
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
.category-count {
|
| 71 |
-
background: #
|
| 72 |
-
padding:
|
| 73 |
border-radius: 12px;
|
| 74 |
-
font-size: 0.
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
.category-item.active .category-count {
|
| 78 |
-
background: rgba(255,255,255,0.
|
|
|
|
| 79 |
}
|
| 80 |
|
| 81 |
.main-content {
|
| 82 |
flex: 1;
|
| 83 |
-
margin-left:
|
| 84 |
-
padding:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
}
|
| 86 |
|
| 87 |
.header h1 {
|
| 88 |
-
font-size:
|
| 89 |
-
margin-bottom:
|
| 90 |
-
color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
}
|
| 92 |
|
| 93 |
.search-bar {
|
| 94 |
-
background: #
|
| 95 |
-
border: 1px solid #
|
| 96 |
-
border-radius:
|
| 97 |
-
padding:
|
| 98 |
width: 100%;
|
| 99 |
-
max-width:
|
| 100 |
-
color: #
|
| 101 |
font-size: 0.95rem;
|
| 102 |
-
margin-top:
|
|
|
|
| 103 |
}
|
| 104 |
|
| 105 |
.search-bar:focus {
|
| 106 |
outline: none;
|
| 107 |
-
border-color: #
|
|
|
|
| 108 |
}
|
| 109 |
|
| 110 |
.category-header {
|
| 111 |
display: flex;
|
| 112 |
align-items: center;
|
| 113 |
-
gap:
|
| 114 |
-
margin:
|
| 115 |
-
padding-bottom: 15px;
|
| 116 |
-
border-bottom: 2px solid #334155;
|
| 117 |
}
|
| 118 |
|
| 119 |
.category-header .icon {
|
| 120 |
-
font-size:
|
| 121 |
}
|
| 122 |
|
| 123 |
.category-header h2 {
|
| 124 |
-
font-size:
|
| 125 |
-
color: #
|
| 126 |
-
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
.playlist-grid {
|
| 130 |
display: grid;
|
| 131 |
-
grid-template-columns: repeat(auto-fill, minmax(
|
| 132 |
-
gap:
|
| 133 |
}
|
| 134 |
|
| 135 |
.playlist-card {
|
| 136 |
-
background: #
|
| 137 |
-
border: 1px solid #
|
| 138 |
border-radius: 12px;
|
| 139 |
overflow: hidden;
|
| 140 |
-
transition: all 0.3s;
|
| 141 |
cursor: pointer;
|
| 142 |
text-decoration: none;
|
| 143 |
display: block;
|
| 144 |
}
|
| 145 |
|
| 146 |
.playlist-card:hover {
|
| 147 |
-
border-color: #
|
| 148 |
-
transform: translateY(-
|
| 149 |
-
box-shadow: 0
|
| 150 |
}
|
| 151 |
|
| 152 |
.playlist-thumbnail {
|
| 153 |
width: 100%;
|
| 154 |
-
height:
|
| 155 |
position: relative;
|
| 156 |
overflow: hidden;
|
|
|
|
| 157 |
}
|
| 158 |
|
| 159 |
-
.
|
| 160 |
position: absolute;
|
| 161 |
-
top:
|
| 162 |
-
left:
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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-
|
| 176 |
-
transform:
|
| 177 |
-
|
| 178 |
}
|
| 179 |
|
| 180 |
-
.play-
|
| 181 |
content: 'โถ';
|
| 182 |
-
color:
|
| 183 |
-
font-size:
|
| 184 |
-
margin-left:
|
| 185 |
}
|
| 186 |
|
| 187 |
.playlist-info {
|
| 188 |
-
padding:
|
| 189 |
}
|
| 190 |
|
| 191 |
-
.
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
| 193 |
color: white;
|
| 194 |
-
padding:
|
| 195 |
-
border-radius:
|
| 196 |
font-size: 0.7rem;
|
| 197 |
font-weight: 600;
|
| 198 |
-
|
| 199 |
-
|
|
|
|
| 200 |
}
|
| 201 |
|
| 202 |
.playlist-title {
|
| 203 |
-
color: #
|
| 204 |
font-weight: 600;
|
| 205 |
-
font-size: 1.
|
| 206 |
-
margin-bottom:
|
|
|
|
| 207 |
}
|
| 208 |
|
| 209 |
.playlist-meta {
|
| 210 |
display: flex;
|
| 211 |
align-items: center;
|
| 212 |
-
gap:
|
| 213 |
font-size: 0.85rem;
|
| 214 |
-
color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
}
|
| 216 |
|
| 217 |
.loading {
|
| 218 |
text-align: center;
|
| 219 |
padding: 100px;
|
| 220 |
-
color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
font-size: 1.5rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
}
|
| 223 |
|
| 224 |
@media (max-width: 768px) {
|
| 225 |
.sidebar {
|
| 226 |
-
width:
|
| 227 |
}
|
| 228 |
|
| 229 |
.main-content {
|
| 230 |
-
margin-left:
|
| 231 |
-
padding:
|
| 232 |
}
|
| 233 |
|
| 234 |
-
.
|
| 235 |
-
|
| 236 |
}
|
| 237 |
}
|
| 238 |
|
|
@@ -242,22 +310,32 @@
|
|
| 242 |
width: 100%;
|
| 243 |
height: auto;
|
| 244 |
border-right: none;
|
| 245 |
-
border-bottom: 1px solid #
|
| 246 |
}
|
| 247 |
|
| 248 |
.main-content {
|
| 249 |
margin-left: 0;
|
|
|
|
| 250 |
}
|
| 251 |
|
| 252 |
.container {
|
| 253 |
flex-direction: column;
|
| 254 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
}
|
| 256 |
</style>
|
| 257 |
</head>
|
| 258 |
<body>
|
| 259 |
<div class="container">
|
| 260 |
<div class="sidebar">
|
|
|
|
| 261 |
<h3>Categories</h3>
|
| 262 |
<div id="categoryList"></div>
|
| 263 |
</div>
|
|
@@ -265,6 +343,7 @@
|
|
| 265 |
<div class="main-content">
|
| 266 |
<div class="header">
|
| 267 |
<h1 id="mainTitle">Playlist Portal</h1>
|
|
|
|
| 268 |
<input type="text" class="search-bar" id="searchBar" placeholder="Search playlists...">
|
| 269 |
</div>
|
| 270 |
|
|
@@ -300,13 +379,14 @@
|
|
| 300 |
allData = await response.json();
|
| 301 |
|
| 302 |
document.getElementById('mainTitle').textContent = allData.title;
|
|
|
|
| 303 |
renderCategories();
|
| 304 |
|
| 305 |
if (allData.categories.length > 0) {
|
| 306 |
showCategory(allData.categories[0].id);
|
| 307 |
}
|
| 308 |
} catch (error) {
|
| 309 |
-
document.getElementById('content').innerHTML = '<div
|
| 310 |
}
|
| 311 |
}
|
| 312 |
|
|
@@ -326,12 +406,10 @@
|
|
| 326 |
});
|
| 327 |
|
| 328 |
const content = document.getElementById('content');
|
| 329 |
-
const now = new Date();
|
| 330 |
-
const today = now.toLocaleDateString('en-US', { day: 'numeric', month: 'short', year: 'numeric' });
|
| 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="
|
| 335 |
}).join('') + '</div>';
|
| 336 |
}
|
| 337 |
|
|
@@ -354,15 +432,13 @@
|
|
| 354 |
});
|
| 355 |
|
| 356 |
const content = document.getElementById('content');
|
| 357 |
-
const now = new Date();
|
| 358 |
-
const today = now.toLocaleDateString('en-US', { day: 'numeric', month: 'short', year: 'numeric' });
|
| 359 |
|
| 360 |
if (results.length === 0) {
|
| 361 |
-
content.innerHTML = '<div
|
| 362 |
} else {
|
| 363 |
-
content.innerHTML = '<div class="category-header"><span class="icon">๐</span><h2>Search Results
|
| 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="
|
| 366 |
}).join('') + '</div>';
|
| 367 |
}
|
| 368 |
});
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
body {
|
| 15 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
|
| 16 |
+
background: #fafafa;
|
| 17 |
+
color: #1a1a1a;
|
| 18 |
min-height: 100vh;
|
| 19 |
}
|
| 20 |
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
.sidebar {
|
| 27 |
+
width: 280px;
|
| 28 |
+
background: #ffffff;
|
| 29 |
+
padding: 32px 24px;
|
| 30 |
+
border-right: 1px solid #e5e5e5;
|
| 31 |
position: fixed;
|
| 32 |
height: 100vh;
|
| 33 |
overflow-y: auto;
|
| 34 |
}
|
| 35 |
|
| 36 |
+
.logo {
|
| 37 |
+
font-size: 1.5rem;
|
| 38 |
+
font-weight: 700;
|
| 39 |
+
color: #1a1a1a;
|
| 40 |
+
margin-bottom: 40px;
|
| 41 |
+
letter-spacing: -0.5px;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
.sidebar h3 {
|
| 45 |
+
color: #737373;
|
| 46 |
+
font-size: 0.75rem;
|
| 47 |
font-weight: 600;
|
| 48 |
text-transform: uppercase;
|
| 49 |
+
letter-spacing: 0.5px;
|
| 50 |
+
margin-bottom: 16px;
|
| 51 |
}
|
| 52 |
|
| 53 |
.category-item {
|
| 54 |
+
padding: 12px 16px;
|
| 55 |
+
margin-bottom: 4px;
|
| 56 |
border-radius: 8px;
|
| 57 |
cursor: pointer;
|
| 58 |
+
transition: all 0.2s ease;
|
| 59 |
display: flex;
|
| 60 |
align-items: center;
|
| 61 |
justify-content: space-between;
|
| 62 |
+
font-size: 0.95rem;
|
| 63 |
}
|
| 64 |
|
| 65 |
.category-item:hover {
|
| 66 |
+
background: #f5f5f5;
|
| 67 |
}
|
| 68 |
|
| 69 |
.category-item.active {
|
| 70 |
+
background: #1a1a1a;
|
| 71 |
color: white;
|
| 72 |
}
|
| 73 |
|
| 74 |
.category-name {
|
| 75 |
display: flex;
|
| 76 |
align-items: center;
|
| 77 |
+
gap: 12px;
|
| 78 |
+
font-weight: 500;
|
| 79 |
}
|
| 80 |
|
| 81 |
.category-count {
|
| 82 |
+
background: #f5f5f5;
|
| 83 |
+
padding: 3px 10px;
|
| 84 |
border-radius: 12px;
|
| 85 |
+
font-size: 0.7rem;
|
| 86 |
+
font-weight: 600;
|
| 87 |
+
color: #737373;
|
| 88 |
}
|
| 89 |
|
| 90 |
.category-item.active .category-count {
|
| 91 |
+
background: rgba(255,255,255,0.15);
|
| 92 |
+
color: rgba(255,255,255,0.9);
|
| 93 |
}
|
| 94 |
|
| 95 |
.main-content {
|
| 96 |
flex: 1;
|
| 97 |
+
margin-left: 280px;
|
| 98 |
+
padding: 48px 64px;
|
| 99 |
+
background: #fafafa;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.header {
|
| 103 |
+
margin-bottom: 48px;
|
| 104 |
}
|
| 105 |
|
| 106 |
.header h1 {
|
| 107 |
+
font-size: 2.5rem;
|
| 108 |
+
margin-bottom: 12px;
|
| 109 |
+
color: #1a1a1a;
|
| 110 |
+
font-weight: 700;
|
| 111 |
+
letter-spacing: -1px;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.header p {
|
| 115 |
+
color: #737373;
|
| 116 |
+
font-size: 1rem;
|
| 117 |
}
|
| 118 |
|
| 119 |
.search-bar {
|
| 120 |
+
background: #ffffff;
|
| 121 |
+
border: 1px solid #e5e5e5;
|
| 122 |
+
border-radius: 10px;
|
| 123 |
+
padding: 14px 20px;
|
| 124 |
width: 100%;
|
| 125 |
+
max-width: 500px;
|
| 126 |
+
color: #1a1a1a;
|
| 127 |
font-size: 0.95rem;
|
| 128 |
+
margin-top: 24px;
|
| 129 |
+
transition: all 0.2s ease;
|
| 130 |
}
|
| 131 |
|
| 132 |
.search-bar:focus {
|
| 133 |
outline: none;
|
| 134 |
+
border-color: #1a1a1a;
|
| 135 |
+
box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
|
| 136 |
}
|
| 137 |
|
| 138 |
.category-header {
|
| 139 |
display: flex;
|
| 140 |
align-items: center;
|
| 141 |
+
gap: 16px;
|
| 142 |
+
margin-bottom: 32px;
|
|
|
|
|
|
|
| 143 |
}
|
| 144 |
|
| 145 |
.category-header .icon {
|
| 146 |
+
font-size: 2.5rem;
|
| 147 |
}
|
| 148 |
|
| 149 |
.category-header h2 {
|
| 150 |
+
font-size: 2rem;
|
| 151 |
+
color: #1a1a1a;
|
| 152 |
+
font-weight: 700;
|
| 153 |
+
letter-spacing: -0.5px;
|
| 154 |
}
|
| 155 |
|
| 156 |
.playlist-grid {
|
| 157 |
display: grid;
|
| 158 |
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 159 |
+
gap: 24px;
|
| 160 |
}
|
| 161 |
|
| 162 |
.playlist-card {
|
| 163 |
+
background: #ffffff;
|
| 164 |
+
border: 1px solid #e5e5e5;
|
| 165 |
border-radius: 12px;
|
| 166 |
overflow: hidden;
|
| 167 |
+
transition: all 0.3s ease;
|
| 168 |
cursor: pointer;
|
| 169 |
text-decoration: none;
|
| 170 |
display: block;
|
| 171 |
}
|
| 172 |
|
| 173 |
.playlist-card:hover {
|
| 174 |
+
border-color: #1a1a1a;
|
| 175 |
+
transform: translateY(-4px);
|
| 176 |
+
box-shadow: 0 12px 24px rgba(0,0,0,0.08);
|
| 177 |
}
|
| 178 |
|
| 179 |
.playlist-thumbnail {
|
| 180 |
width: 100%;
|
| 181 |
+
height: 180px;
|
| 182 |
position: relative;
|
| 183 |
overflow: hidden;
|
| 184 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 185 |
}
|
| 186 |
|
| 187 |
+
.thumbnail-overlay {
|
| 188 |
position: absolute;
|
| 189 |
+
top: 0;
|
| 190 |
+
left: 0;
|
| 191 |
+
right: 0;
|
| 192 |
+
bottom: 0;
|
| 193 |
+
background: rgba(0,0,0,0.3);
|
| 194 |
+
display: flex;
|
| 195 |
+
align-items: center;
|
| 196 |
+
justify-content: center;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
.play-button {
|
| 200 |
+
width: 64px;
|
| 201 |
+
height: 64px;
|
| 202 |
+
background: rgba(255, 255, 255, 0.95);
|
| 203 |
border-radius: 50%;
|
| 204 |
display: flex;
|
| 205 |
align-items: center;
|
| 206 |
justify-content: center;
|
| 207 |
+
transition: all 0.3s ease;
|
|
|
|
| 208 |
}
|
| 209 |
|
| 210 |
+
.playlist-card:hover .play-button {
|
| 211 |
+
transform: scale(1.1);
|
| 212 |
+
background: white;
|
| 213 |
}
|
| 214 |
|
| 215 |
+
.play-button::after {
|
| 216 |
content: 'โถ';
|
| 217 |
+
color: #1a1a1a;
|
| 218 |
+
font-size: 20px;
|
| 219 |
+
margin-left: 3px;
|
| 220 |
}
|
| 221 |
|
| 222 |
.playlist-info {
|
| 223 |
+
padding: 24px;
|
| 224 |
}
|
| 225 |
|
| 226 |
+
.platform-badge {
|
| 227 |
+
display: inline-flex;
|
| 228 |
+
align-items: center;
|
| 229 |
+
gap: 6px;
|
| 230 |
+
background: #1a1a1a;
|
| 231 |
color: white;
|
| 232 |
+
padding: 6px 12px;
|
| 233 |
+
border-radius: 6px;
|
| 234 |
font-size: 0.7rem;
|
| 235 |
font-weight: 600;
|
| 236 |
+
text-transform: uppercase;
|
| 237 |
+
letter-spacing: 0.5px;
|
| 238 |
+
margin-bottom: 12px;
|
| 239 |
}
|
| 240 |
|
| 241 |
.playlist-title {
|
| 242 |
+
color: #1a1a1a;
|
| 243 |
font-weight: 600;
|
| 244 |
+
font-size: 1.1rem;
|
| 245 |
+
margin-bottom: 12px;
|
| 246 |
+
line-height: 1.4;
|
| 247 |
}
|
| 248 |
|
| 249 |
.playlist-meta {
|
| 250 |
display: flex;
|
| 251 |
align-items: center;
|
| 252 |
+
gap: 12px;
|
| 253 |
font-size: 0.85rem;
|
| 254 |
+
color: #737373;
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
.meta-item {
|
| 258 |
+
display: flex;
|
| 259 |
+
align-items: center;
|
| 260 |
+
gap: 6px;
|
| 261 |
}
|
| 262 |
|
| 263 |
.loading {
|
| 264 |
text-align: center;
|
| 265 |
padding: 100px;
|
| 266 |
+
color: #737373;
|
| 267 |
+
font-size: 1.2rem;
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
.empty-state {
|
| 271 |
+
text-align: center;
|
| 272 |
+
padding: 80px 20px;
|
| 273 |
+
color: #737373;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
.empty-state h3 {
|
| 277 |
font-size: 1.5rem;
|
| 278 |
+
margin-bottom: 8px;
|
| 279 |
+
color: #1a1a1a;
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
@media (max-width: 1024px) {
|
| 283 |
+
.main-content {
|
| 284 |
+
padding: 32px 40px;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.playlist-grid {
|
| 288 |
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
| 289 |
+
}
|
| 290 |
}
|
| 291 |
|
| 292 |
@media (max-width: 768px) {
|
| 293 |
.sidebar {
|
| 294 |
+
width: 240px;
|
| 295 |
}
|
| 296 |
|
| 297 |
.main-content {
|
| 298 |
+
margin-left: 240px;
|
| 299 |
+
padding: 24px;
|
| 300 |
}
|
| 301 |
|
| 302 |
+
.header h1 {
|
| 303 |
+
font-size: 2rem;
|
| 304 |
}
|
| 305 |
}
|
| 306 |
|
|
|
|
| 310 |
width: 100%;
|
| 311 |
height: auto;
|
| 312 |
border-right: none;
|
| 313 |
+
border-bottom: 1px solid #e5e5e5;
|
| 314 |
}
|
| 315 |
|
| 316 |
.main-content {
|
| 317 |
margin-left: 0;
|
| 318 |
+
padding: 24px 20px;
|
| 319 |
}
|
| 320 |
|
| 321 |
.container {
|
| 322 |
flex-direction: column;
|
| 323 |
}
|
| 324 |
+
|
| 325 |
+
.playlist-grid {
|
| 326 |
+
grid-template-columns: 1fr;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.header h1 {
|
| 330 |
+
font-size: 1.75rem;
|
| 331 |
+
}
|
| 332 |
}
|
| 333 |
</style>
|
| 334 |
</head>
|
| 335 |
<body>
|
| 336 |
<div class="container">
|
| 337 |
<div class="sidebar">
|
| 338 |
+
<div class="logo">๐ Portal</div>
|
| 339 |
<h3>Categories</h3>
|
| 340 |
<div id="categoryList"></div>
|
| 341 |
</div>
|
|
|
|
| 343 |
<div class="main-content">
|
| 344 |
<div class="header">
|
| 345 |
<h1 id="mainTitle">Playlist Portal</h1>
|
| 346 |
+
<p id="subtitle">Curated educational content</p>
|
| 347 |
<input type="text" class="search-bar" id="searchBar" placeholder="Search playlists...">
|
| 348 |
</div>
|
| 349 |
|
|
|
|
| 379 |
allData = await response.json();
|
| 380 |
|
| 381 |
document.getElementById('mainTitle').textContent = allData.title;
|
| 382 |
+
document.getElementById('subtitle').textContent = allData.subtitle;
|
| 383 |
renderCategories();
|
| 384 |
|
| 385 |
if (allData.categories.length > 0) {
|
| 386 |
showCategory(allData.categories[0].id);
|
| 387 |
}
|
| 388 |
} catch (error) {
|
| 389 |
+
document.getElementById('content').innerHTML = '<div class="empty-state"><h3>Error</h3><p>' + error.message + '</p></div>';
|
| 390 |
}
|
| 391 |
}
|
| 392 |
|
|
|
|
| 406 |
});
|
| 407 |
|
| 408 |
const content = document.getElementById('content');
|
|
|
|
|
|
|
| 409 |
|
| 410 |
content.innerHTML = '<div class="category-header"><span class="icon">' + category.icon + '</span><h2>' + category.name + '</h2></div><div class="playlist-grid">' +
|
| 411 |
category.playlists.map((pl, index) => {
|
| 412 |
+
return '<a href="' + pl.url + '" target="_blank" class="playlist-card"><div class="playlist-thumbnail" style="background: ' + getGradient(index) + ';"><div class="thumbnail-overlay"><div class="play-button"></div></div></div><div class="playlist-info"><div class="platform-badge"><span>โถ</span> YouTube</div><div class="playlist-title">' + pl.title + '</div><div class="playlist-meta"><div class="meta-item"><span>๐</span><span>' + category.name + '</span></div></div></div></a>';
|
| 413 |
}).join('') + '</div>';
|
| 414 |
}
|
| 415 |
|
|
|
|
| 432 |
});
|
| 433 |
|
| 434 |
const content = document.getElementById('content');
|
|
|
|
|
|
|
| 435 |
|
| 436 |
if (results.length === 0) {
|
| 437 |
+
content.innerHTML = '<div class="empty-state"><h3>No results found</h3><p>Try searching with different keywords</p></div>';
|
| 438 |
} else {
|
| 439 |
+
content.innerHTML = '<div class="category-header"><span class="icon">๐</span><h2>Search Results</h2></div><div class="playlist-grid">' +
|
| 440 |
results.map((result, index) => {
|
| 441 |
+
return '<a href="' + result.url + '" target="_blank" class="playlist-card"><div class="playlist-thumbnail" style="background: ' + getGradient(index) + ';"><div class="thumbnail-overlay"><div class="play-button"></div></div></div><div class="playlist-info"><div class="platform-badge"><span>โถ</span> YouTube</div><div class="playlist-title">' + result.title + '</div><div class="playlist-meta"><div class="meta-item"><span>' + result.category.icon + '</span><span>' + result.category.name + '</span></div></div></div></a>';
|
| 442 |
}).join('') + '</div>';
|
| 443 |
}
|
| 444 |
});
|