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

69 lines
2.7 KiB
HTML
Raw Normal View History

2025-04-12 22:25:54 -04:00
{% extends "profile/base.html" %} {% block content %} {% if
2025-04-19 18:59:55 -04:00
profile.settings.enable_questions and (user or
profile.settings.allow_anonymous_questions) %}
2025-04-12 22:25:54 -04:00
<div style="display: contents">
{{ components::create_question_form(receiver=profile.id,
header=profile.settings.motivational_header) }}
2025-04-12 22:25:54 -04:00
</div>
2025-05-18 16:43:56 -04:00
{%- endif %} {% if not tag and 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-05-18 16:43:56 -04:00
{% if post[2].read_access == "Everybody" -%}
{% 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 %}
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], can_manage_post=is_self) }}
2025-05-18 16:43:56 -04:00
{%- endif %}
{%- endif %}
{% endfor %}
</div>
</div>
2025-05-18 16:43:56 -04:00
{%- endif %}
<div class="card-nest">
2025-05-18 16:43:56 -04:00
<div class="card small flex gap-2 justify-between items-center">
<div class="flex gap-2 items-center">
{% if not tag -%} {{ icon "clock" }}
<span>{{ text "auth:label.recent_posts" }}</span>
{% else %} {{ icon "tag" }}
<span
>{{ text "auth:label.recent_with_tag" }}: <b>{{ tag }}</b></span
>
{%- endif %}
</div>
{% if user -%}
<a
href="/search?profile={{ profile.id }}"
class="button quaternary small"
>
{{ icon "search" }}
<span>{{ text "general:link.search" }}</span>
</a>
{%- endif %}
</div>
<div class="card flex flex-col gap-4">
<!-- prettier-ignore -->
{% for post in posts %}
2025-05-18 16:43:56 -04:00
{% if post[2].read_access == "Everybody" -%}
{% if post[0].context.repost and post[0].context.repost.reposting -%}
2025-04-13 01:24:16 -04:00
{{ 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 %}
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], can_manage_post=is_self) }}
2025-05-18 16:43:56 -04:00
{%- endif %}
{%- endif %}
{% endfor %}
2025-05-09 12:21:56 +00:00
{{ components::pagination(page=page, items=posts|length, key="&tag=", value=tag) }}
</div>
</div>
{% endblock %}