mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-27 22:38:10 +09:00
cli images
This commit is contained in:
parent
26cbcba6a6
commit
c1da33a658
@ -18,7 +18,6 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 45px;
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
@ -50,12 +50,22 @@ window.onload = async () => {
|
|||||||
const avatar = document.createElement("img")
|
const avatar = document.createElement("img")
|
||||||
name.textContent = `${note.user.name} @${note.user.username}`;
|
name.textContent = `${note.user.name} @${note.user.username}`;
|
||||||
avatar.src = note.user.avatarUrl;
|
avatar.src = note.user.avatarUrl;
|
||||||
|
avatar.style = 'height: 40px'
|
||||||
const text = document.createElement("div");
|
const text = document.createElement("div");
|
||||||
text.textContent = `${note.text}`;
|
text.textContent = `${note.text}`;
|
||||||
el.appendChild(header);
|
el.appendChild(header);
|
||||||
header.appendChild(avatar);
|
header.appendChild(avatar);
|
||||||
header.appendChild(name);
|
header.appendChild(name);
|
||||||
el.appendChild(text);
|
if (note.text) {
|
||||||
|
el.appendChild(text);
|
||||||
|
}
|
||||||
|
if (note.files) {
|
||||||
|
for (const file of note.files) {
|
||||||
|
const img = document.createElement("img");
|
||||||
|
img.src = file.properties.thumbnailUrl;
|
||||||
|
el.appendChild(img)
|
||||||
|
}
|
||||||
|
}
|
||||||
tl.appendChild(el);
|
tl.appendChild(el);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user