prismic/src/html/templates/short_post.html
2025-04-25 00:33:14 +01:00

29 lines
1.3 KiB
HTML

<div class="post">
<h3><a href="/users/{{post.user.name}}" class="user-{{post.user.perms}}">{{post.user.name}}</a> posted in <a href="/boards/{{post.board.name}}" class="board-name">/{{post.board.name}}/</a></h3>
<h6>posted at <span class="time">{{post.created_at}}</span></h6>
{% if post.reference and post.reference.show %}
<h6>ref post: <a href="/post/{{post.reference.url}}">{{post.reference.short_content}}</a></h6>
{% endif %}
{% if post.attachments %}
<h6>{{post.attachments|length}} attachments</h6>
<div class="attachments">
{% for attachment in post.attachments %}
{% if attachment.type == "image" %}
<a href="{{attachment.url}}"><img src="{{attachment.url}}" alt="{{attachment.file_name}}" width="100px"></a>
{% endif %}
{% endfor %}
</div>
{% endif %}
<p>{{post.short_content}}</p>
<h6>
<a href="/posts/{{ post.id }}">View Post</a>
{% if post.replies > 0 %}
({{ post.replies }} replies)
{% endif %}
{% if session.name == "SYSTEM" %}
| <a href="/delete/post/{{ post.id }}">Delete</a>
{% elif session.name == post.user.name %}
| <a href="/delete/post/{{ post.id }}">Delete</a>
{% endif %}
</h6>
</div>