tetratto/crates/app/src/public/html/profile/posts.html

46 lines
1.8 KiB
HTML
Raw Normal View History

2025-04-12 22:25:54 -04:00
{% extends "profile/base.html" %} {% block content %} {% if
profile.settings.enable_questions and user %}
<div style="display: contents">
{{ components::create_question_form(receiver=profile.id) }}
</div>
{% endif %} {% if pinned|length != 0 %}
<div class="card-nest">
<div class="card small flex gap-2 items-center">
{{ icon "pin" }}
<span>{{ text "communities:label.pinned" }}</span>
</div>
<div class="card flex flex-col gap-4">
<!-- prettier-ignore -->
{% for post in pinned %}
2025-04-10 18:16:52 -04:00
{% if post[0].context.repost and post[0].context.repost.reposting %}
{{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true, can_manage_post=is_self) }}
{% else %}
2025-04-12 22:25:54 -04:00
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], can_manage_post=is_self) }}
2025-04-10 18:16:52 -04:00
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
<div class="card-nest">
<div class="card small flex gap-2 items-center">
{{ icon "clock" }}
<span>{{ text "auth:label.recent_posts" }}</span>
</div>
<div class="card flex flex-col gap-4">
<!-- prettier-ignore -->
{% for post in posts %}
2025-04-10 18:16:52 -04:00
{% if post[0].context.repost and post[0].context.repost.reposting %}
{{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true, can_manage_post=is_self) }}
{% else %}
2025-04-12 22:25:54 -04:00
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], can_manage_post=is_self) }}
2025-04-10 18:16:52 -04:00
{% endif %}
{% endfor %}
{{ components::pagination(page=page, items=posts|length) }}
</div>
</div>
{% endblock %}