Upload static/index.html with huggingface_hub
Browse files- static/index.html +6 -3
static/index.html
CHANGED
|
@@ -283,7 +283,10 @@
|
|
| 283 |
.agent-avatar {
|
| 284 |
width: 16px; height: 16px; border-radius: 50%;
|
| 285 |
background: var(--bg-soft); object-fit: cover;
|
| 286 |
-
|
|
|
|
|
|
|
|
|
|
| 287 |
}
|
| 288 |
.lb-table .agent-link { gap: 0; }
|
| 289 |
.lb-table .agent-link .agent-name { font-weight: 500; }
|
|
@@ -1066,7 +1069,7 @@ function renderAgentName(agent_id, opts = {}) {
|
|
| 1066 |
if (!hf_user) return escapeHtml(display);
|
| 1067 |
|
| 1068 |
const avatar = (opts.avatar !== false)
|
| 1069 |
-
? `<img class="agent-avatar" src="${escapeHtml(avatarUrl(hf_user))}"
|
| 1070 |
: '';
|
| 1071 |
return `<a class="agent-link" href="${escapeHtml(profileUrl(hf_user))}" target="_blank" rel="noopener noreferrer" data-agent="${escapeHtml(agent_id)}" data-hf-user="${escapeHtml(hf_user)}">${avatar}<span class="agent-name">${escapeHtml(display)}</span></a>`;
|
| 1072 |
}
|
|
@@ -1577,7 +1580,7 @@ let agentCardHideTimer = null;
|
|
| 1577 |
function buildAgentCardHtml(info) {
|
| 1578 |
const id = displayAgentName(info.agent);
|
| 1579 |
const avatar = info.hf_user
|
| 1580 |
-
? `<img src="${escapeHtml(avatarUrl(info.hf_user))}"
|
| 1581 |
: '';
|
| 1582 |
|
| 1583 |
const lastEpoch = lastMessageEpoch(info.agent);
|
|
|
|
| 283 |
.agent-avatar {
|
| 284 |
width: 16px; height: 16px; border-radius: 50%;
|
| 285 |
background: var(--bg-soft); object-fit: cover;
|
| 286 |
+
/* Explicit block + size locks the layout box before the image data
|
| 287 |
+
arrives, so loading the avatar doesn't cause a CLS shift that
|
| 288 |
+
reflows the row and visibly drops the username/timestamp. */
|
| 289 |
+
display: block; flex: 0 0 auto;
|
| 290 |
}
|
| 291 |
.lb-table .agent-link { gap: 0; }
|
| 292 |
.lb-table .agent-link .agent-name { font-weight: 500; }
|
|
|
|
| 1069 |
if (!hf_user) return escapeHtml(display);
|
| 1070 |
|
| 1071 |
const avatar = (opts.avatar !== false)
|
| 1072 |
+
? `<img class="agent-avatar" src="${escapeHtml(avatarUrl(hf_user))}" width="16" height="16" alt="" onerror="this.style.visibility='hidden'">`
|
| 1073 |
: '';
|
| 1074 |
return `<a class="agent-link" href="${escapeHtml(profileUrl(hf_user))}" target="_blank" rel="noopener noreferrer" data-agent="${escapeHtml(agent_id)}" data-hf-user="${escapeHtml(hf_user)}">${avatar}<span class="agent-name">${escapeHtml(display)}</span></a>`;
|
| 1075 |
}
|
|
|
|
| 1580 |
function buildAgentCardHtml(info) {
|
| 1581 |
const id = displayAgentName(info.agent);
|
| 1582 |
const avatar = info.hf_user
|
| 1583 |
+
? `<img src="${escapeHtml(avatarUrl(info.hf_user))}" width="32" height="32" alt="" onerror="this.style.visibility='hidden'">`
|
| 1584 |
: '';
|
| 1585 |
|
| 1586 |
const lastEpoch = lastMessageEpoch(info.agent);
|