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 dateSort = (a, b) => new Date(b.date) - new Date(a.date);
|
||||||
|
|
||||||
const mapComment = comment => ({
|
const mapComment = comment => {
|
||||||
|
console.log(comment);
|
||||||
|
return ({
|
||||||
author: {
|
author: {
|
||||||
name: comment.author_name,
|
name: comment.author_name,
|
||||||
avatars: comment.author_avatar_urls,
|
avatars: comment.author_avatar_urls,
|
||||||
@ -12,6 +14,7 @@ const mapComment = comment => ({
|
|||||||
canonical: comment.meta.url,
|
canonical: comment.meta.url,
|
||||||
date: comment.date,
|
date: comment.date,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = async () => {
|
module.exports = async () => {
|
||||||
|
@ -32,7 +32,7 @@ eleventyComputed:
|
|||||||
<div class="row overlaps">
|
<div class="row overlaps">
|
||||||
{% for like in post.comments.like %}
|
{% for like in post.comments.like %}
|
||||||
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
|
<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>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
@ -46,7 +46,7 @@ eleventyComputed:
|
|||||||
<div class="row overlaps">
|
<div class="row overlaps">
|
||||||
{% for like in post.comments.repost %}
|
{% for like in post.comments.repost %}
|
||||||
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
|
<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>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user