Partially fix missing author images on mentions
This commit is contained in:
parent
41b127417e
commit
8e1009a9a1
@ -2,7 +2,9 @@ const postCache = require('./_postData');
|
||||
|
||||
const dateSort = (a, b) => new Date(b.date) - new Date(a.date);
|
||||
|
||||
const mapComment = comment => ({
|
||||
const mapComment = comment => {
|
||||
console.log(comment);
|
||||
return ({
|
||||
author: {
|
||||
name: comment.author_name,
|
||||
avatars: comment.author_avatar_urls,
|
||||
@ -12,6 +14,7 @@ const mapComment = comment => ({
|
||||
canonical: comment.meta.url,
|
||||
date: comment.date,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
module.exports = async () => {
|
||||
|
@ -32,7 +32,7 @@ eleventyComputed:
|
||||
<div class="row overlaps">
|
||||
{% for like in post.comments.like %}
|
||||
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
|
||||
<img srcset="/assets/avatar-placeholder.png, {{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
|
||||
<img srcset="{{ like.author.avatars["96"] }}, /assets/avatar-placeholder.png" alt="{{ like.author.name }}" class="circle" />
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@ -46,7 +46,7 @@ eleventyComputed:
|
||||
<div class="row overlaps">
|
||||
{% for like in post.comments.repost %}
|
||||
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
|
||||
<img srcset="/assets/avatar-placeholder.png, {{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
|
||||
<img srcset="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user