Use the image shortcode for webmention avatars to cache them. TODO: Permanently store on the WP-side so that it can survive re-renders
This commit is contained in:
parent
8e1009a9a1
commit
e26eeaa701
@ -3,7 +3,6 @@ const postCache = require('./_postData');
|
||||
const dateSort = (a, b) => new Date(b.date) - new Date(a.date);
|
||||
|
||||
const mapComment = comment => {
|
||||
console.log(comment);
|
||||
return ({
|
||||
author: {
|
||||
name: comment.author_name,
|
||||
|
@ -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="{{ like.author.avatars["96"] }}, /assets/avatar-placeholder.png" alt="{{ like.author.name }}" class="circle" />
|
||||
{% remoteImage(like.author.avatars["96"], like.author.name, "circle", "96px", [96] %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@ -44,9 +44,9 @@ eleventyComputed:
|
||||
<h3 class="block w-full">Reposts</h3>
|
||||
|
||||
<div class="row overlaps">
|
||||
{% for like in post.comments.repost %}
|
||||
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
|
||||
<img srcset="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
|
||||
{% for repost in post.comments.repost %}
|
||||
<a href="{{ repost.author.url }}" rel="noreferrer" target="_blank">
|
||||
{% remoteImage(repost.author.avatars["96"], repost.author.name, "circle", "96px", [96] %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -4,4 +4,5 @@
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
height: auto;
|
||||
}
|
Loading…
Reference in New Issue
Block a user