Fix post reply formatting

This commit is contained in:
Lewis Dale 2023-02-25 21:27:26 +00:00
parent 24d728be55
commit d2706dbc74

View File

@ -23,7 +23,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 }}"> <a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
<img src="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" /> <img src="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
</a> </a>
{% endfor %} {% endfor %}
@ -36,7 +36,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 }}"> <a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
<img src="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" /> <img src="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
</a> </a>
{% endfor %} {% endfor %}
@ -48,17 +48,17 @@ eleventyComputed:
<div class="stack-xs"> <div class="stack-xs">
<h3 class="block w-full">Replies</h3> <h3 class="block w-full">Replies</h3>
<ol> <ol class="stack-md">
{% for reply in post.comments.reply %} {% for reply in post.comments.reply | reverse %}
<li class="row items-center"> <li class="row items-center justify-between">
<a href="{{ like.author.url }}"> <a href="{{ like.author.url }}" class="self-start" rel="noreferrer" target="_blank">
<img src="{{ reply.author.avatars["96"] }}" alt="{{ reply.author.name }}" class="max-w-[4rem] box" /> <img src="{{ reply.author.avatars["96"] }}" alt="{{ reply.author.name }}" class="max-w-[4rem] box" />
</a> </a>
<div class="stack-2xs"> <div class="stack-2xs max-w-[50ch]">
{% set date = reply.date | parseDate %} {% set date = reply.date | parseDate %}
<h4>{{ reply.author.name }} <span class="font-normal">on</span> {{ date | dateDisplay }} <span class="font-normal">at</span> {{ date | timeDisplay }}</h4> <h4>{{ reply.author.name }} <span class="font-normal">on</span> {{ date | dateDisplay }} <span class="font-normal">at</span> {{ date | timeDisplay }}</h4>
<a href="{{ reply.canonical }}">Original comment</a> <a href="{{ reply.canonical }}" rel="noreferrer" target="_blank">Original comment</a>
<p>{{ reply.content | safe }}</p> <p>{{ reply.content | safe }}</p>
</div> </div>
</li> </li>