samey/templates/fragments/submit_post_details.html

22 lines
647 B
HTML

{% include "fragments/post_details.html" %} {% if let Some(parent_post) =
parent_post %}
<article id="parent-post" hx-swap-oob="outerHTML">
<h2>Parent</h2>
<a
href="/post/{{ parent_post.id }}"
title="{% if let Some(tags) = parent_post.tags %}{{ tags }}{% endif %}"
>
<img src="/files/{{ parent_post.thumbnail }}" />
<div>{{ parent_post.rating }}</div>
</a>
</article>
{% else %}
<article id="parent-post" hx-swap-oob="outerHTML" hidden></article>
{% endif %}
<ul id="tags-list" hx-swap-oob="outerHTML">
{% for tag in tags %}
<li>
<a href="/posts?tags={{ tag.name }}">{{ tag.name }}</a>
</li>
{% endfor %}
</ul>