tetratto/crates/app/src/public/html/communities/feed.html

46 lines
2 KiB
HTML
Raw Normal View History

{% import "components.html" as components %} {% extends "communities/base.html"
%} {% block content %}
<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
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 %}
<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 %}
{% endfor %}
{{ components::pagination(page=page, items=feed|length) }}
</div>
</div>
</div>
{% endblock %}