45 lines
2 KiB
HTML
45 lines
2 KiB
HTML
{% import "components.html" as components %} {% extends "communities/base.html"
|
|
%} {% block content %}
|
|
<div class="flex flex-col gap-4 w-full">
|
|
{{ macros::community_nav(community=community, selected="posts") }} {% 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 %}
|
|
{% if post[0].context.repost and post[0].context.repost.reposting -%}
|
|
{{ components::repost(repost=post[2], post=post[0], owner=post[1], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
|
{% else %}
|
|
{{ components::post(post=post[0], owner=post[1], question=post[3], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
|
{%- endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{%- endif %}
|
|
|
|
<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 %}
|
|
{% if post[0].context.repost and post[0].context.repost.reposting -%}
|
|
{{ components::repost(repost=post[2], post=post[0], owner=post[1], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
|
{% else %}
|
|
{{ components::post(post=post[0], owner=post[1], question=post[3], secondary=true, show_community=false, can_manage_post=can_manage_posts) }}
|
|
{%- endif %}
|
|
{% endfor %}
|
|
|
|
{{ components::pagination(page=page, items=feed|length) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|