Link from avatar to user
Build LinkLog Development Image / development-image (push) Successful in 13s

This commit is contained in:
2026-08-26 12:11:12 +02:00
parent 6651ce8993
commit f0ae526a96
5 changed files with 24 additions and 5 deletions
+9 -4
View File
@@ -146,12 +146,17 @@ function renderFeed(items, showIdentity = true) {
if (showIdentity) {
const header = document.createElement('div');
header.className = 'link-header';
header.appendChild(createAvatar(item.user));
const username = item.user?.username || 'unknown';
const profileLink = document.createElement('a');
profileLink.className = 'user-link';
profileLink.href = `/${encodeURIComponent(username)}/`;
profileLink.setAttribute('aria-label', `View ${username}'s profile`);
profileLink.appendChild(createAvatar(item.user));
const userName = document.createElement('div');
userName.className = 'user-name';
userName.textContent = item.user?.username || 'unknown';
header.appendChild(userName);
userName.textContent = username;
profileLink.appendChild(userName);
header.appendChild(profileLink);
article.appendChild(header);
}
article.appendChild(title);