Spaces:
Running
Running
Update index.html
Browse files- index.html +368 -25
index.html
CHANGED
|
@@ -242,6 +242,7 @@
|
|
| 242 |
opacity: 0;
|
| 243 |
transform: translateY(20px);
|
| 244 |
animation: fadeInUp 0.5s ease forwards;
|
|
|
|
| 245 |
}
|
| 246 |
|
| 247 |
.image-card:nth-child(1) { animation-delay: 0s; }
|
|
@@ -283,6 +284,17 @@
|
|
| 283 |
font-size: 0.9rem;
|
| 284 |
}
|
| 285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
.model-year {
|
| 287 |
font-family: 'Space Mono', monospace;
|
| 288 |
font-size: 0.75rem;
|
|
@@ -333,6 +345,121 @@
|
|
| 333 |
aspect-ratio: 1;
|
| 334 |
}
|
| 335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
/* Footer */
|
| 337 |
footer {
|
| 338 |
padding: 4rem 3rem;
|
|
@@ -354,43 +481,155 @@
|
|
| 354 |
@media (max-width: 900px) {
|
| 355 |
.compare-grid {
|
| 356 |
grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
}
|
| 358 |
}
|
| 359 |
|
| 360 |
@media (max-width: 768px) {
|
| 361 |
header {
|
| 362 |
padding: 1rem 1.5rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 363 |
}
|
| 364 |
|
| 365 |
.prompt-section {
|
| 366 |
-
padding:
|
| 367 |
}
|
| 368 |
|
| 369 |
.prompt-row {
|
| 370 |
flex-direction: column;
|
| 371 |
-
gap:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 372 |
}
|
| 373 |
|
| 374 |
.prompt-nav {
|
| 375 |
align-self: flex-start;
|
| 376 |
}
|
| 377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
.timeline {
|
| 379 |
gap: 0.25rem;
|
|
|
|
| 380 |
}
|
| 381 |
|
| 382 |
.timeline-btn {
|
| 383 |
-
padding: 0.5rem
|
| 384 |
}
|
| 385 |
|
| 386 |
-
.
|
| 387 |
-
font-size: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
}
|
| 389 |
}
|
| 390 |
|
| 391 |
-
@media (max-width:
|
| 392 |
.compare-grid {
|
| 393 |
-
grid-template-columns: 1fr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
}
|
| 395 |
}
|
| 396 |
</style>
|
|
@@ -428,6 +667,20 @@
|
|
| 428 |
<div class="image-container" id="imageContainer"></div>
|
| 429 |
</main>
|
| 430 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 431 |
<footer>
|
| 432 |
<p>Inspired by <a href="https://progress.openai.com" target="_blank">OpenAI's Progress highlights page</a></p>
|
| 433 |
<p style="margin-top: 0.5rem;">
|
|
@@ -441,12 +694,12 @@
|
|
| 441 |
|
| 442 |
// Data
|
| 443 |
const models = [
|
| 444 |
-
{ id: 'dalle_mini', name: 'DALL-E Mini', year: '2022', folder: 'dalle_mini' },
|
| 445 |
-
{ id: 'sd15', name: 'SD 1.5', year: '2022', folder: 'sd1.5' },
|
| 446 |
-
{ id: 'sdxl', name: 'SDXL', year: '2023', folder: 'sdxl' },
|
| 447 |
-
{ id: 'flux1', name: 'FLUX.1 Dev', year: '2024', folder: 'flux1_dev' },
|
| 448 |
-
{ id: 'flux2', name: 'FLUX.2 Dev Turbo', year: '2025', folder: 'flux2_turbo' },
|
| 449 |
-
{ id: 'qwen', name: 'Qwen-Image 2512', year: '2025', folder: 'qwen_image' },
|
| 450 |
];
|
| 451 |
|
| 452 |
const prompts = [
|
|
@@ -504,8 +757,10 @@
|
|
| 504 |
|
| 505 |
// State
|
| 506 |
let currentPromptIndex = 0;
|
| 507 |
-
let currentModelIndex = models.length - 1;
|
| 508 |
-
let viewMode = 'compare';
|
|
|
|
|
|
|
| 509 |
|
| 510 |
// DOM Elements
|
| 511 |
const promptText = document.getElementById('promptText');
|
|
@@ -517,12 +772,22 @@
|
|
| 517 |
const nextBtn = document.getElementById('nextPrompt');
|
| 518 |
const viewBtns = document.querySelectorAll('.view-btn');
|
| 519 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 520 |
// Initialize
|
| 521 |
function init() {
|
| 522 |
totalPrompts.textContent = prompts.length;
|
| 523 |
renderTimeline();
|
| 524 |
renderPrompt();
|
| 525 |
setupEventListeners();
|
|
|
|
| 526 |
|
| 527 |
// Hide timeline initially since we start in compare mode
|
| 528 |
timeline.style.display = 'none';
|
|
@@ -574,34 +839,99 @@
|
|
| 574 |
function renderSingleView(prompt) {
|
| 575 |
const model = models[currentModelIndex];
|
| 576 |
const images = [
|
| 577 |
-
`${BASE_URL}/${model.folder}/${prompt.file}.png`,
|
| 578 |
-
`${BASE_URL}/${model.folder}/${prompt.file}_2.png`,
|
| 579 |
-
`${BASE_URL}/${model.folder}/${prompt.file}_3.png`
|
| 580 |
];
|
| 581 |
|
|
|
|
|
|
|
| 582 |
imageContainer.className = 'image-container';
|
| 583 |
-
imageContainer.innerHTML = images.map((
|
| 584 |
-
<div class="image-card" style="animation-delay: ${i * 0.1}s">
|
| 585 |
-
<img src="${src}" alt="${prompt.text}" loading="lazy" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect fill=%22%231a1a1f%22 width=%22100%22 height=%22100%22/><text x=%2250%22 y=%2250%22 text-anchor=%22middle%22 fill=%22%23636366%22 font-size=%228%22>Not found</text></svg>'">
|
| 586 |
<div class="image-meta">
|
| 587 |
-
<span class="model-name">${
|
| 588 |
-
<span class="model-year">${
|
| 589 |
</div>
|
| 590 |
</div>
|
| 591 |
`).join('');
|
|
|
|
|
|
|
| 592 |
}
|
| 593 |
|
| 594 |
function renderCompareView(prompt) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 595 |
imageContainer.className = 'image-container compare-grid';
|
| 596 |
imageContainer.innerHTML = models.map((model, i) => `
|
| 597 |
-
<div class="image-card" style="animation-delay: ${i * 0.1}s">
|
| 598 |
<img src="${BASE_URL}/${model.folder}/${prompt.file}.png" alt="${prompt.text}" loading="lazy" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect fill=%22%231a1a1f%22 width=%22100%22 height=%22100%22/><text x=%2250%22 y=%2250%22 text-anchor=%22middle%22 fill=%22%23636366%22 font-size=%228%22>Not found</text></svg>'">
|
| 599 |
<div class="image-meta">
|
| 600 |
-
<span class="model-name">${model.name}</span>
|
| 601 |
<span class="model-year">${model.year}</span>
|
| 602 |
</div>
|
| 603 |
</div>
|
| 604 |
`).join('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 605 |
}
|
| 606 |
|
| 607 |
function setupEventListeners() {
|
|
@@ -630,6 +960,19 @@
|
|
| 630 |
|
| 631 |
// Keyboard navigation
|
| 632 |
document.addEventListener('keydown', (e) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 633 |
if (e.key === 'ArrowLeft') {
|
| 634 |
currentPromptIndex = (currentPromptIndex - 1 + prompts.length) % prompts.length;
|
| 635 |
renderPrompt();
|
|
|
|
| 242 |
opacity: 0;
|
| 243 |
transform: translateY(20px);
|
| 244 |
animation: fadeInUp 0.5s ease forwards;
|
| 245 |
+
cursor: pointer;
|
| 246 |
}
|
| 247 |
|
| 248 |
.image-card:nth-child(1) { animation-delay: 0s; }
|
|
|
|
| 284 |
font-size: 0.9rem;
|
| 285 |
}
|
| 286 |
|
| 287 |
+
.model-name a {
|
| 288 |
+
color: var(--text-primary);
|
| 289 |
+
text-decoration: none;
|
| 290 |
+
transition: color 0.2s;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
.model-name a:hover {
|
| 294 |
+
color: var(--accent);
|
| 295 |
+
text-decoration: underline;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
.model-year {
|
| 299 |
font-family: 'Space Mono', monospace;
|
| 300 |
font-size: 0.75rem;
|
|
|
|
| 345 |
aspect-ratio: 1;
|
| 346 |
}
|
| 347 |
|
| 348 |
+
/* Lightbox Modal */
|
| 349 |
+
.lightbox {
|
| 350 |
+
display: none;
|
| 351 |
+
position: fixed;
|
| 352 |
+
top: 0;
|
| 353 |
+
left: 0;
|
| 354 |
+
width: 100%;
|
| 355 |
+
height: 100%;
|
| 356 |
+
background: rgba(0, 0, 0, 0.95);
|
| 357 |
+
z-index: 2000;
|
| 358 |
+
align-items: center;
|
| 359 |
+
justify-content: center;
|
| 360 |
+
padding: 1rem;
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
.lightbox.active {
|
| 364 |
+
display: flex;
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
.lightbox-content {
|
| 368 |
+
position: relative;
|
| 369 |
+
max-width: 90vw;
|
| 370 |
+
max-height: 90vh;
|
| 371 |
+
display: flex;
|
| 372 |
+
flex-direction: column;
|
| 373 |
+
align-items: center;
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
.lightbox-content img {
|
| 377 |
+
max-width: 100%;
|
| 378 |
+
max-height: calc(90vh - 80px);
|
| 379 |
+
object-fit: contain;
|
| 380 |
+
border-radius: 12px;
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
.lightbox-meta {
|
| 384 |
+
margin-top: 1rem;
|
| 385 |
+
text-align: center;
|
| 386 |
+
color: var(--text-primary);
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
.lightbox-meta .model-name {
|
| 390 |
+
font-size: 1.1rem;
|
| 391 |
+
margin-bottom: 0.25rem;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
.lightbox-meta .model-name a {
|
| 395 |
+
color: var(--text-primary);
|
| 396 |
+
text-decoration: none;
|
| 397 |
+
transition: color 0.2s;
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
.lightbox-meta .model-name a:hover {
|
| 401 |
+
color: var(--accent);
|
| 402 |
+
text-decoration: underline;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
.lightbox-meta .model-year {
|
| 406 |
+
display: inline-block;
|
| 407 |
+
}
|
| 408 |
+
|
| 409 |
+
.lightbox-close {
|
| 410 |
+
position: absolute;
|
| 411 |
+
top: -50px;
|
| 412 |
+
right: 0;
|
| 413 |
+
width: 40px;
|
| 414 |
+
height: 40px;
|
| 415 |
+
border: none;
|
| 416 |
+
background: var(--bg-card);
|
| 417 |
+
color: var(--text-primary);
|
| 418 |
+
border-radius: 50%;
|
| 419 |
+
cursor: pointer;
|
| 420 |
+
font-size: 1.5rem;
|
| 421 |
+
display: flex;
|
| 422 |
+
align-items: center;
|
| 423 |
+
justify-content: center;
|
| 424 |
+
transition: all 0.2s;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
.lightbox-close:hover {
|
| 428 |
+
background: var(--bg-secondary);
|
| 429 |
+
transform: scale(1.1);
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
.lightbox-nav {
|
| 433 |
+
position: absolute;
|
| 434 |
+
top: 50%;
|
| 435 |
+
transform: translateY(-50%);
|
| 436 |
+
width: 50px;
|
| 437 |
+
height: 50px;
|
| 438 |
+
border: 1px solid var(--border);
|
| 439 |
+
background: var(--bg-card);
|
| 440 |
+
color: var(--text-primary);
|
| 441 |
+
border-radius: 50%;
|
| 442 |
+
cursor: pointer;
|
| 443 |
+
font-size: 1.5rem;
|
| 444 |
+
display: flex;
|
| 445 |
+
align-items: center;
|
| 446 |
+
justify-content: center;
|
| 447 |
+
transition: all 0.2s;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
.lightbox-nav:hover {
|
| 451 |
+
background: var(--bg-secondary);
|
| 452 |
+
border-color: var(--text-muted);
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
.lightbox-prev {
|
| 456 |
+
left: -70px;
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
.lightbox-next {
|
| 460 |
+
right: -70px;
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
/* Footer */
|
| 464 |
footer {
|
| 465 |
padding: 4rem 3rem;
|
|
|
|
| 481 |
@media (max-width: 900px) {
|
| 482 |
.compare-grid {
|
| 483 |
grid-template-columns: repeat(2, 1fr);
|
| 484 |
+
gap: 1rem;
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.lightbox-prev {
|
| 488 |
+
left: 10px;
|
| 489 |
+
}
|
| 490 |
+
|
| 491 |
+
.lightbox-next {
|
| 492 |
+
right: 10px;
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
.lightbox-nav {
|
| 496 |
+
width: 40px;
|
| 497 |
+
height: 40px;
|
| 498 |
+
font-size: 1.25rem;
|
| 499 |
+
background: rgba(26, 26, 31, 0.9);
|
| 500 |
}
|
| 501 |
}
|
| 502 |
|
| 503 |
@media (max-width: 768px) {
|
| 504 |
header {
|
| 505 |
padding: 1rem 1.5rem;
|
| 506 |
+
flex-direction: column;
|
| 507 |
+
gap: 1rem;
|
| 508 |
+
align-items: flex-start;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
.header-title {
|
| 512 |
+
font-size: 0.85rem;
|
| 513 |
+
line-height: 1.4;
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
.nav-links {
|
| 517 |
+
align-self: flex-end;
|
| 518 |
+
margin-top: -2rem;
|
| 519 |
}
|
| 520 |
|
| 521 |
.prompt-section {
|
| 522 |
+
padding: 1.5rem 1rem;
|
| 523 |
}
|
| 524 |
|
| 525 |
.prompt-row {
|
| 526 |
flex-direction: column;
|
| 527 |
+
gap: 1rem;
|
| 528 |
+
margin-bottom: 1.5rem;
|
| 529 |
+
padding-bottom: 1.5rem;
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
.prompt-text {
|
| 533 |
+
font-size: 1.1rem;
|
| 534 |
}
|
| 535 |
|
| 536 |
.prompt-nav {
|
| 537 |
align-self: flex-start;
|
| 538 |
}
|
| 539 |
|
| 540 |
+
.nav-btn {
|
| 541 |
+
width: 40px;
|
| 542 |
+
height: 40px;
|
| 543 |
+
font-size: 1rem;
|
| 544 |
+
}
|
| 545 |
+
|
| 546 |
+
.prompt-indicator {
|
| 547 |
+
font-size: 0.75rem;
|
| 548 |
+
min-width: 60px;
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
.view-toggle {
|
| 552 |
+
margin-bottom: 1.5rem;
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
.view-btn {
|
| 556 |
+
padding: 0.4rem 0.75rem;
|
| 557 |
+
font-size: 0.7rem;
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
.timeline {
|
| 561 |
gap: 0.25rem;
|
| 562 |
+
margin-bottom: 1.5rem;
|
| 563 |
}
|
| 564 |
|
| 565 |
.timeline-btn {
|
| 566 |
+
padding: 0.5rem 0.75rem;
|
| 567 |
}
|
| 568 |
|
| 569 |
+
.timeline-btn .year {
|
| 570 |
+
font-size: 0.8rem;
|
| 571 |
+
}
|
| 572 |
+
|
| 573 |
+
.timeline-btn .model {
|
| 574 |
+
font-size: 0.6rem;
|
| 575 |
+
}
|
| 576 |
+
|
| 577 |
+
.image-card {
|
| 578 |
+
border-radius: 12px;
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
.image-meta {
|
| 582 |
+
padding: 0.75rem 1rem;
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
.model-name {
|
| 586 |
+
font-size: 0.8rem;
|
| 587 |
+
}
|
| 588 |
+
|
| 589 |
+
.model-year {
|
| 590 |
+
font-size: 0.65rem;
|
| 591 |
+
padding: 0.2rem 0.5rem;
|
| 592 |
+
}
|
| 593 |
+
|
| 594 |
+
footer {
|
| 595 |
+
padding: 2rem 1.5rem;
|
| 596 |
+
margin-top: 3rem;
|
| 597 |
+
}
|
| 598 |
+
|
| 599 |
+
footer p {
|
| 600 |
+
font-size: 0.75rem;
|
| 601 |
+
}
|
| 602 |
+
|
| 603 |
+
.lightbox-close {
|
| 604 |
+
top: 10px;
|
| 605 |
+
right: 10px;
|
| 606 |
+
position: fixed;
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
.lightbox-content {
|
| 610 |
+
max-width: 95vw;
|
| 611 |
}
|
| 612 |
}
|
| 613 |
|
| 614 |
+
@media (max-width: 500px) {
|
| 615 |
.compare-grid {
|
| 616 |
+
grid-template-columns: repeat(2, 1fr);
|
| 617 |
+
gap: 0.75rem;
|
| 618 |
+
}
|
| 619 |
+
|
| 620 |
+
.image-meta {
|
| 621 |
+
padding: 0.5rem 0.75rem;
|
| 622 |
+
flex-direction: column;
|
| 623 |
+
align-items: flex-start;
|
| 624 |
+
gap: 0.25rem;
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
.model-name {
|
| 628 |
+
font-size: 0.7rem;
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
+
.model-year {
|
| 632 |
+
font-size: 0.6rem;
|
| 633 |
}
|
| 634 |
}
|
| 635 |
</style>
|
|
|
|
| 667 |
<div class="image-container" id="imageContainer"></div>
|
| 668 |
</main>
|
| 669 |
|
| 670 |
+
<!-- Lightbox Modal -->
|
| 671 |
+
<div class="lightbox" id="lightbox">
|
| 672 |
+
<div class="lightbox-content">
|
| 673 |
+
<button class="lightbox-close" id="lightboxClose">×</button>
|
| 674 |
+
<button class="lightbox-nav lightbox-prev" id="lightboxPrev">←</button>
|
| 675 |
+
<button class="lightbox-nav lightbox-next" id="lightboxNext">→</button>
|
| 676 |
+
<img src="" alt="" id="lightboxImg">
|
| 677 |
+
<div class="lightbox-meta">
|
| 678 |
+
<div class="model-name" id="lightboxModel"></div>
|
| 679 |
+
<span class="model-year" id="lightboxYear"></span>
|
| 680 |
+
</div>
|
| 681 |
+
</div>
|
| 682 |
+
</div>
|
| 683 |
+
|
| 684 |
<footer>
|
| 685 |
<p>Inspired by <a href="https://progress.openai.com" target="_blank">OpenAI's Progress highlights page</a></p>
|
| 686 |
<p style="margin-top: 0.5rem;">
|
|
|
|
| 694 |
|
| 695 |
// Data
|
| 696 |
const models = [
|
| 697 |
+
{ id: 'dalle_mini', name: 'DALL-E Mini', year: '2022', folder: 'dalle_mini', link: 'https://huggingface.co/spaces/dalle-mini/dalle-mini' },
|
| 698 |
+
{ id: 'sd15', name: 'SD 1.5', year: '2022', folder: 'sd1.5', link: 'https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5' },
|
| 699 |
+
{ id: 'sdxl', name: 'SDXL', year: '2023', folder: 'sdxl', link: 'https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0' },
|
| 700 |
+
{ id: 'flux1', name: 'FLUX.1 Dev', year: '2024', folder: 'flux1_dev', link: 'https://huggingface.co/spaces/black-forest-labs/FLUX.1-dev' },
|
| 701 |
+
{ id: 'flux2', name: 'FLUX.2 Dev Turbo', year: '2025', folder: 'flux2_turbo', link: 'https://huggingface.co/spaces/multimodalart/FLUX.2-dev-turbo' },
|
| 702 |
+
{ id: 'qwen', name: 'Qwen-Image 2512', year: '2025', folder: 'qwen_image', link: 'https://huggingface.co/spaces/Qwen/Qwen-Image-2512' },
|
| 703 |
];
|
| 704 |
|
| 705 |
const prompts = [
|
|
|
|
| 757 |
|
| 758 |
// State
|
| 759 |
let currentPromptIndex = 0;
|
| 760 |
+
let currentModelIndex = models.length - 1;
|
| 761 |
+
let viewMode = 'compare';
|
| 762 |
+
let lightboxImages = [];
|
| 763 |
+
let lightboxCurrentIndex = 0;
|
| 764 |
|
| 765 |
// DOM Elements
|
| 766 |
const promptText = document.getElementById('promptText');
|
|
|
|
| 772 |
const nextBtn = document.getElementById('nextPrompt');
|
| 773 |
const viewBtns = document.querySelectorAll('.view-btn');
|
| 774 |
|
| 775 |
+
// Lightbox Elements
|
| 776 |
+
const lightbox = document.getElementById('lightbox');
|
| 777 |
+
const lightboxImg = document.getElementById('lightboxImg');
|
| 778 |
+
const lightboxModel = document.getElementById('lightboxModel');
|
| 779 |
+
const lightboxYear = document.getElementById('lightboxYear');
|
| 780 |
+
const lightboxClose = document.getElementById('lightboxClose');
|
| 781 |
+
const lightboxPrev = document.getElementById('lightboxPrev');
|
| 782 |
+
const lightboxNext = document.getElementById('lightboxNext');
|
| 783 |
+
|
| 784 |
// Initialize
|
| 785 |
function init() {
|
| 786 |
totalPrompts.textContent = prompts.length;
|
| 787 |
renderTimeline();
|
| 788 |
renderPrompt();
|
| 789 |
setupEventListeners();
|
| 790 |
+
setupLightbox();
|
| 791 |
|
| 792 |
// Hide timeline initially since we start in compare mode
|
| 793 |
timeline.style.display = 'none';
|
|
|
|
| 839 |
function renderSingleView(prompt) {
|
| 840 |
const model = models[currentModelIndex];
|
| 841 |
const images = [
|
| 842 |
+
{ src: `${BASE_URL}/${model.folder}/${prompt.file}.png`, model: model.name, year: model.year, link: model.link },
|
| 843 |
+
{ src: `${BASE_URL}/${model.folder}/${prompt.file}_2.png`, model: model.name, year: model.year, link: model.link },
|
| 844 |
+
{ src: `${BASE_URL}/${model.folder}/${prompt.file}_3.png`, model: model.name, year: model.year, link: model.link }
|
| 845 |
];
|
| 846 |
|
| 847 |
+
lightboxImages = images;
|
| 848 |
+
|
| 849 |
imageContainer.className = 'image-container';
|
| 850 |
+
imageContainer.innerHTML = images.map((img, i) => `
|
| 851 |
+
<div class="image-card" data-index="${i}" style="animation-delay: ${i * 0.1}s">
|
| 852 |
+
<img src="${img.src}" alt="${prompt.text}" loading="lazy" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect fill=%22%231a1a1f%22 width=%22100%22 height=%22100%22/><text x=%2250%22 y=%2250%22 text-anchor=%22middle%22 fill=%22%23636366%22 font-size=%228%22>Not found</text></svg>'">
|
| 853 |
<div class="image-meta">
|
| 854 |
+
<span class="model-name"><a href="${img.link}" target="_blank" onclick="event.stopPropagation()">${img.model}</a></span>
|
| 855 |
+
<span class="model-year">${img.year}</span>
|
| 856 |
</div>
|
| 857 |
</div>
|
| 858 |
`).join('');
|
| 859 |
+
|
| 860 |
+
attachImageClickHandlers();
|
| 861 |
}
|
| 862 |
|
| 863 |
function renderCompareView(prompt) {
|
| 864 |
+
lightboxImages = models.map(model => ({
|
| 865 |
+
src: `${BASE_URL}/${model.folder}/${prompt.file}.png`,
|
| 866 |
+
model: model.name,
|
| 867 |
+
year: model.year,
|
| 868 |
+
link: model.link
|
| 869 |
+
}));
|
| 870 |
+
|
| 871 |
imageContainer.className = 'image-container compare-grid';
|
| 872 |
imageContainer.innerHTML = models.map((model, i) => `
|
| 873 |
+
<div class="image-card" data-index="${i}" style="animation-delay: ${i * 0.1}s">
|
| 874 |
<img src="${BASE_URL}/${model.folder}/${prompt.file}.png" alt="${prompt.text}" loading="lazy" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect fill=%22%231a1a1f%22 width=%22100%22 height=%22100%22/><text x=%2250%22 y=%2250%22 text-anchor=%22middle%22 fill=%22%23636366%22 font-size=%228%22>Not found</text></svg>'">
|
| 875 |
<div class="image-meta">
|
| 876 |
+
<span class="model-name"><a href="${model.link}" target="_blank" onclick="event.stopPropagation()">${model.name}</a></span>
|
| 877 |
<span class="model-year">${model.year}</span>
|
| 878 |
</div>
|
| 879 |
</div>
|
| 880 |
`).join('');
|
| 881 |
+
|
| 882 |
+
attachImageClickHandlers();
|
| 883 |
+
}
|
| 884 |
+
|
| 885 |
+
function attachImageClickHandlers() {
|
| 886 |
+
document.querySelectorAll('.image-card').forEach(card => {
|
| 887 |
+
card.addEventListener('click', (e) => {
|
| 888 |
+
// Don't open lightbox if clicking on the link
|
| 889 |
+
if (e.target.tagName === 'A') return;
|
| 890 |
+
const index = parseInt(card.dataset.index);
|
| 891 |
+
openLightbox(index);
|
| 892 |
+
});
|
| 893 |
+
});
|
| 894 |
+
}
|
| 895 |
+
|
| 896 |
+
function openLightbox(index) {
|
| 897 |
+
lightboxCurrentIndex = index;
|
| 898 |
+
updateLightboxContent();
|
| 899 |
+
lightbox.classList.add('active');
|
| 900 |
+
document.body.style.overflow = 'hidden';
|
| 901 |
+
}
|
| 902 |
+
|
| 903 |
+
function closeLightbox() {
|
| 904 |
+
lightbox.classList.remove('active');
|
| 905 |
+
document.body.style.overflow = '';
|
| 906 |
+
}
|
| 907 |
+
|
| 908 |
+
function updateLightboxContent() {
|
| 909 |
+
const img = lightboxImages[lightboxCurrentIndex];
|
| 910 |
+
lightboxImg.src = img.src;
|
| 911 |
+
lightboxModel.innerHTML = `<a href="${img.link}" target="_blank">${img.model}</a>`;
|
| 912 |
+
lightboxYear.textContent = img.year;
|
| 913 |
+
}
|
| 914 |
+
|
| 915 |
+
function lightboxNavPrev() {
|
| 916 |
+
lightboxCurrentIndex = (lightboxCurrentIndex - 1 + lightboxImages.length) % lightboxImages.length;
|
| 917 |
+
updateLightboxContent();
|
| 918 |
+
}
|
| 919 |
+
|
| 920 |
+
function lightboxNavNext() {
|
| 921 |
+
lightboxCurrentIndex = (lightboxCurrentIndex + 1) % lightboxImages.length;
|
| 922 |
+
updateLightboxContent();
|
| 923 |
+
}
|
| 924 |
+
|
| 925 |
+
function setupLightbox() {
|
| 926 |
+
lightboxClose.addEventListener('click', closeLightbox);
|
| 927 |
+
lightboxPrev.addEventListener('click', lightboxNavPrev);
|
| 928 |
+
lightboxNext.addEventListener('click', lightboxNavNext);
|
| 929 |
+
|
| 930 |
+
lightbox.addEventListener('click', (e) => {
|
| 931 |
+
if (e.target === lightbox) {
|
| 932 |
+
closeLightbox();
|
| 933 |
+
}
|
| 934 |
+
});
|
| 935 |
}
|
| 936 |
|
| 937 |
function setupEventListeners() {
|
|
|
|
| 960 |
|
| 961 |
// Keyboard navigation
|
| 962 |
document.addEventListener('keydown', (e) => {
|
| 963 |
+
// Lightbox navigation
|
| 964 |
+
if (lightbox.classList.contains('active')) {
|
| 965 |
+
if (e.key === 'Escape') {
|
| 966 |
+
closeLightbox();
|
| 967 |
+
} else if (e.key === 'ArrowLeft') {
|
| 968 |
+
lightboxNavPrev();
|
| 969 |
+
} else if (e.key === 'ArrowRight') {
|
| 970 |
+
lightboxNavNext();
|
| 971 |
+
}
|
| 972 |
+
return;
|
| 973 |
+
}
|
| 974 |
+
|
| 975 |
+
// Main navigation
|
| 976 |
if (e.key === 'ArrowLeft') {
|
| 977 |
currentPromptIndex = (currentPromptIndex - 1 + prompts.length) % prompts.length;
|
| 978 |
renderPrompt();
|