|
268 | 268 | gap: 2rem; |
269 | 269 | } |
270 | 270 |
|
| 271 | + /* Unified UI Components */ |
| 272 | + .ui-title { |
| 273 | + font-family: 'Plus Jakarta Sans', sans-serif; |
| 274 | + font-weight: 600; |
| 275 | + word-break: break-all; |
| 276 | + color: var(--fg); |
| 277 | + } |
| 278 | +
|
| 279 | + .ui-meta { |
| 280 | + font-family: 'Space Mono', monospace; |
| 281 | + font-size: 0.75rem; |
| 282 | + color: var(--fg-dim); |
| 283 | + } |
| 284 | +
|
| 285 | + .ui-meta b { color: var(--fg); font-weight: 700; } |
| 286 | + .ui-meta .accent { color: var(--accent); } |
| 287 | +
|
| 288 | + .ui-stars { |
| 289 | + color: var(--accent); |
| 290 | + font-weight: 700; |
| 291 | + } |
| 292 | +
|
| 293 | + .ui-tag { |
| 294 | + font-family: 'Space Mono', monospace; |
| 295 | + font-size: 0.7rem; |
| 296 | + padding: 0.2rem 0.6rem; |
| 297 | + border: 1px solid var(--border); |
| 298 | + text-transform: uppercase; |
| 299 | + display: inline-flex; |
| 300 | + align-items: center; |
| 301 | + gap: 0.5rem; |
| 302 | + background: var(--surface); |
| 303 | + transition: var(--transition); |
| 304 | + } |
| 305 | +
|
271 | 306 | .repo-card { |
272 | 307 | background: var(--surface); |
273 | 308 | border: 1px solid var(--border); |
|
287 | 322 |
|
288 | 323 | @media (max-width: 600px) { |
289 | 324 | .repo-card { padding: 1.5rem; } |
290 | | - .card-title { font-size: 1.8rem; } |
| 325 | + .card-title { font-size: 1.5rem; } |
291 | 326 | } |
292 | 327 |
|
293 | 328 | .card-lang { |
294 | | - font-family: 'Space Mono', monospace; |
295 | | - font-size: 0.7rem; |
296 | | - text-transform: uppercase; |
297 | | - color: var(--accent); |
298 | 329 | margin-bottom: 1.5rem; |
299 | | - display: flex; |
300 | | - align-items: center; |
301 | | - gap: 0.5rem; |
| 330 | + color: var(--accent); |
| 331 | + border-color: var(--accent-soft); |
302 | 332 | } |
303 | 333 |
|
304 | 334 | .card-lang::before { |
|
310 | 340 | } |
311 | 341 |
|
312 | 342 | .card-title { |
313 | | - font-family: 'Plus Jakarta Sans', sans-serif; |
314 | 343 | font-size: 1.4rem; |
315 | | - font-weight: 600; |
316 | 344 | margin-bottom: 1rem; |
317 | 345 | line-height: 1.3; |
318 | | - word-break: break-all; |
319 | 346 | } |
320 | 347 |
|
321 | 348 | .card-desc { |
|
334 | 361 | display: flex; |
335 | 362 | justify-content: space-between; |
336 | 363 | align-items: center; |
337 | | - font-family: 'Space Mono', monospace; |
338 | | - font-size: 0.75rem; |
339 | 364 | border-top: 1px solid var(--border); |
340 | 365 | padding-top: 1.5rem; |
341 | 366 | } |
342 | 367 |
|
343 | | - .card-stars { color: var(--fg); font-weight: 700; } |
344 | | -
|
345 | 368 | /* Modal */ |
346 | 369 | .modal { |
347 | 370 | position: fixed; |
|
389 | 412 | .modal-close:hover { color: var(--accent); } |
390 | 413 |
|
391 | 414 | .modal-title { |
392 | | - font-family: 'Plus Jakarta Sans', sans-serif; |
393 | 415 | font-size: 2.5rem; |
394 | | - font-weight: 600; |
395 | 416 | line-height: 1.2; |
396 | | - margin-bottom: 2rem; |
| 417 | + margin-bottom: 1rem; |
| 418 | + } |
| 419 | +
|
| 420 | + .modal-meta-group { |
| 421 | + display: flex; |
| 422 | + gap: 2rem; |
| 423 | + align-items: center; |
| 424 | + margin-bottom: 1.5rem; |
397 | 425 | } |
398 | 426 |
|
399 | 427 | .modal-section { margin-bottom: 3rem; } |
|
421 | 449 | .topic-list { |
422 | 450 | display: flex; |
423 | 451 | flex-wrap: wrap; |
424 | | - gap: 0.5rem; |
| 452 | + gap: 0.6rem; |
425 | 453 | } |
426 | 454 |
|
427 | 455 | .topic-tag { |
428 | | - font-family: 'Space Mono', monospace; |
429 | 456 | font-size: 0.75rem; |
430 | | - padding: 0.3rem 0.6rem; |
431 | | - border: 1px solid var(--border); |
432 | 457 | } |
433 | 458 |
|
434 | 459 | .modal-actions { |
|
669 | 694 |
|
670 | 695 | <div class="modal-section modal-header-info"> |
671 | 696 | <div> |
672 | | - <div id="m-lang" class="card-lang" style="margin-bottom: 1rem;"></div> |
673 | | - <h2 id="m-name" class="modal-title" style="margin-bottom: 0.5rem;"></h2> |
674 | | - <div style="display: flex; gap: 2rem; align-items: center; margin-bottom: 1.5rem; font-family: 'Space Mono', monospace; font-size: 0.9rem;"> |
675 | | - <div id="m-stars" style="color: var(--accent); font-weight: 700; font-size: 1.2rem;"></div> |
676 | | - <div id="m-updated" style="color: var(--fg-dim);"></div> |
| 697 | + <div id="m-lang" class="ui-tag card-lang" style="margin-bottom: 1rem;"></div> |
| 698 | + <h2 id="m-name" class="ui-title modal-title"></h2> |
| 699 | + <div class="modal-meta-group ui-meta"> |
| 700 | + <div id="m-stars" class="ui-stars" style="font-size: 1rem;"></div> |
| 701 | + <div id="m-updated"></div> |
677 | 702 | </div> |
678 | 703 | <div id="m-topics" class="topic-list"></div> |
679 | 704 | </div> |
|
760 | 785 | const summary = item.summary[currentLang] || item.summary.zh || texts.no_sum; |
761 | 786 | |
762 | 787 | card.innerHTML = ` |
763 | | - <div class="card-lang">${item.language || 'DATA'}</div> |
764 | | - <h2 class="card-title">${item.full_name}</h2> |
| 788 | + <div class="card-lang ui-tag">${item.language || 'DATA'}</div> |
| 789 | + <h2 class="card-title ui-title">${item.full_name}</h2> |
765 | 790 | <p class="card-desc">${summary}</p> |
766 | | - <div class="card-footer"> |
767 | | - <span class="card-stars">☆ ${item.stars}</span> |
| 791 | + <div class="card-footer ui-meta"> |
| 792 | + <span class="ui-stars">☆ ${item.stars}</span> |
768 | 793 | <span>${texts.updated}: ${item.updated_at}</span> |
769 | 794 | </div> |
770 | 795 | `; |
|
841 | 866 | topicsContainer.innerHTML = ''; |
842 | 867 | (item.topics || []).forEach(t => { |
843 | 868 | const span = document.createElement('span'); |
844 | | - span.className = 'topic-tag'; |
| 869 | + span.className = 'ui-tag topic-tag'; |
845 | 870 | span.textContent = t.toUpperCase(); |
846 | 871 | topicsContainer.appendChild(span); |
847 | 872 | }); |
|
855 | 880 | |
856 | 881 | tags.forEach(t => { |
857 | 882 | const span = document.createElement('span'); |
858 | | - span.className = 'topic-tag'; |
| 883 | + span.className = 'ui-tag topic-tag'; |
859 | 884 | span.style.borderColor = 'var(--accent)'; |
| 885 | + span.style.color = 'var(--accent)'; |
860 | 886 | span.textContent = `#${t.toUpperCase()}`; |
861 | 887 | tagsContainer.appendChild(span); |
862 | 888 | }); |
|
0 commit comments