lewisdale.dev/src/_includes/post.njk

72 lines
2.6 KiB
Plaintext
Raw Normal View History

---
layout: base.njk
2023-02-15 20:38:52 +00:00
includePrism: true
eleventyComputed:
2023-02-16 10:46:48 +00:00
title: "{{ post.title.rendered | safe }}"
description: "{{ post.yoast_head_json.description }}"
---
2023-02-14 22:12:04 +00:00
<main class="wrapper-md stack-lg">
2023-02-16 14:33:53 +00:00
<article class="stack-md h-entry">
<h1 class="p-name"><a href="{{ post.url }}">{{ title | safe }}</a></h1>
{{ post.excerpt.rendered | safe }}
<div class="e-content stack-md">
2023-02-14 22:12:04 +00:00
{{ content | safe }}
2023-02-16 14:33:53 +00:00
</div>
2023-02-14 22:12:04 +00:00
</article>
<section class="stack-sm">
<h2>Responses</h2>
{% if post.comments.like | length %}
<div class="stack-xs">
<h3 class="block w-full">Likes</h3>
<div class="row overlaps">
{% for like in post.comments.like %}
2023-02-25 21:27:26 +00:00
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
<img src="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
</a>
{% endfor %}
</div>
</div>
{% endif %}
{% if post.comments.repost | length %}
<div class="stack-xs">
<h3 class="block w-full">Reposts</h3>
<div class="row overlaps">
{% for like in post.comments.repost %}
2023-02-25 21:27:26 +00:00
<a href="{{ like.author.url }}" rel="noreferrer" target="_blank">
<img src="{{ like.author.avatars["96"] }}" alt="{{ like.author.name }}" class="circle" />
</a>
{% endfor %}
</div>
</div>
{% endif %}
{% if post.comments.reply | length %}
<div class="stack-xs">
<h3 class="block w-full">Replies</h3>
2023-02-25 21:27:26 +00:00
<ol class="stack-md">
{% for reply in post.comments.reply | reverse %}
<li class="sidebar items-center">
2023-02-25 21:27:26 +00:00
<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" />
</a>
<div class="stack-2xs basis-[50ch]">
{% 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>
2023-02-25 21:27:26 +00:00
<a href="{{ reply.canonical }}" rel="noreferrer" target="_blank">Original comment</a>
<p>{{ reply.content | safe }}</p>
</div>
</li>
{% endfor %}
</ol>
</div>
{% endif %}
</section>
2023-02-14 22:12:04 +00:00
</main>