2025-04-08 15:49:41 -04:00
|
|
|
{% import "components.html" as components %} {% extends "communities/base.html"
|
|
|
|
%} {% block content %}
|
2025-03-29 00:26:56 -04:00
|
|
|
<div class="flex flex-col gap-4 w-full">
|
2025-04-12 22:25:54 -04:00
|
|
|
{{ macros::community_nav(community=community, selected="posts") }} {% if
|
2025-05-17 19:57:09 -04:00
|
|
|
pinned|length != 0 %}
|
2025-04-03 12:43:36 -04:00
|
|
|
<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[0].context.repost and post[0].context.repost.reposting -%}
|
2025-04-10 18:16:52 -04:00
|
|
|
{{ components::repost(repost=post[2], post=post[0], owner=post[1], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
|
|
|
{% else %}
|
2025-04-12 22:25:54 -04:00
|
|
|
{{ components::post(post=post[0], owner=post[1], question=post[3], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
2025-05-18 16:43:56 -04:00
|
|
|
{%- endif %}
|
2025-04-03 12:43:36 -04:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2025-05-18 16:43:56 -04:00
|
|
|
{%- endif %}
|
2025-03-29 00:26:56 -04:00
|
|
|
|
|
|
|
<div class="card-nest">
|
|
|
|
<div class="card small flex gap-2 items-center">
|
|
|
|
{{ icon "newspaper" }}
|
|
|
|
<span>{{ text "communities:label.posts" }}</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card flex flex-col gap-4">
|
|
|
|
<!-- prettier-ignore -->
|
|
|
|
{% for post in feed %}
|
2025-05-18 16:43:56 -04:00
|
|
|
{% if post[0].context.repost and post[0].context.repost.reposting -%}
|
2025-04-10 18:16:52 -04:00
|
|
|
{{ components::repost(repost=post[2], post=post[0], owner=post[1], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
|
|
|
{% else %}
|
2025-04-12 22:25:54 -04:00
|
|
|
{{ components::post(post=post[0], owner=post[1], question=post[3], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
2025-05-18 16:43:56 -04:00
|
|
|
{%- endif %}
|
2025-03-29 00:26:56 -04:00
|
|
|
{% endfor %}
|
2025-04-01 16:12:13 -04:00
|
|
|
|
|
|
|
{{ components::pagination(page=page, items=feed|length) }}
|
2025-03-29 00:26:56 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|