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 dateSort = (a, b) => new Date(b.date) - new Date(a.date);
|
||||||
|
|
||||||
const mapComment = comment => {
|
const mapComment = comment => {
|
||||||
console.log(comment);
|
|
||||||
return ({
|
return ({
|
||||||
author: {
|
author: {
|
||||||
name: comment.author_name,
|
name: comment.author_name,
|
||||||
|
@ -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="{{ 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>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
@ -44,9 +44,9 @@ eleventyComputed:
|
|||||||
<h3 class="block w-full">Reposts</h3>
|
<h3 class="block w-full">Reposts</h3>
|
||||||
|
|
||||||
<div class="row overlaps">
|
<div class="row overlaps">
|
||||||
{% for like in post.comments.repost %}
|
{% for repost in post.comments.repost %}
|
||||||
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
|
<a href="{{ repost.author.url }}" rel="noreferrer" target="_blank">
|
||||||
<img srcset="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
|
{% remoteImage(repost.author.avatars["96"], repost.author.name, "circle", "96px", [96] %}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,4 +4,5 @@
|
|||||||
display: block;
|
display: block;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user