34 lines
959 B
HTML
34 lines
959 B
HTML
{% include "fragments/post_details.html" %} {% if let Some(parent_post) =
|
|
parent_post %}
|
|
<article id="parent-post" hx-swap-oob="outerHTML">
|
|
<h2>Parent post</h2>
|
|
<div style="width: min-content">
|
|
<a
|
|
href="/post/{{ parent_post.id }}"
|
|
title="{% if let Some(tags) = parent_post.tags %}{{ tags }}{% endif %}"
|
|
>
|
|
<img src="/files/{{ parent_post.thumbnail }}" />
|
|
<div class="flex">
|
|
<div>{{ parent_post.rating | upper }}</div>
|
|
<div>{{ parent_post.media_type }}</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</article>
|
|
{% else %}
|
|
<article id="parent-post" hx-swap-oob="outerHTML" hidden></article>
|
|
{% endif %}
|
|
<article id="tags-list" hx-swap-oob="outerHTML">
|
|
<h2>Tags</h2>
|
|
{% if tags.is_empty() %}
|
|
<p>No tags in post. Consider adding some!</p>
|
|
{% else %}
|
|
<ul>
|
|
{% for tag in tags %}
|
|
<li>
|
|
<a href="/posts?tags={{ tag.name }}">{{ tag.name }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</article>
|