Link from avatar to user
Build LinkLog Development Image / development-image (push) Successful in 13s
Build LinkLog Development Image / development-image (push) Successful in 13s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user