diff --git a/src/frontend/index.html b/src/frontend/index.html index 6da9ff6..505290a 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -97,7 +97,17 @@ .card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); } .card-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; - display: block; background: #0d1117; + display: block; background: #161b22; + } + .card-thumb.placeholder { + display: flex; flex-direction: column; + align-items: center; justify-content: center; + aspect-ratio: 16/10; + background: #161b22; color: var(--fg-dim); font-size: 32px; + text-align: center; padding: 16px; gap: 4px; + } + .card-thumb.placeholder small { + font-size: 12px; color: #484f58; } .card-body { padding: 10px 12px; } .card-filename { font-size: 13px; font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } @@ -254,9 +264,10 @@ function renderGallery(images, total, page) { const desc = img.description || img.ocr_text || ''; const thumb = `/api/images/${img.id}/thumbnail`; const dims = (img.width && img.height) ? `${img.width}×${img.height}` : ''; + const cardId = `card-${img.id}`; return ` -
- ${escHtml(img.filename || '')} +
+ ${escHtml(img.filename || '')}
${escHtml(img.filename || img.id)}
@@ -292,7 +303,7 @@ async function openImage(id) { const tags = (img.tags || []).map(t => `${escHtml(t)}`).join(' '); modal.innerHTML = ` - ${escHtml(img.filename)} + ${escHtml(img.filename)}