add: profile and full search
This commit is contained in:
parent
b8b0ef7f21
commit
3e4ee8126a
52 changed files with 897 additions and 484 deletions
|
@ -5,7 +5,7 @@ profile.settings.allow_anonymous_questions) %}
|
|||
{{ components::create_question_form(receiver=profile.id,
|
||||
header=profile.settings.motivational_header) }}
|
||||
</div>
|
||||
{% endif %} {% if not tag and pinned|length != 0 %}
|
||||
{%- endif %} {% if not tag and pinned|length != 0 -%}
|
||||
<div class="card-nest">
|
||||
<div class="card small flex gap-2 items-center">
|
||||
{{ icon "pin" }}
|
||||
|
@ -15,37 +15,51 @@ profile.settings.allow_anonymous_questions) %}
|
|||
<div class="card flex flex-col gap-4">
|
||||
<!-- prettier-ignore -->
|
||||
{% for post in pinned %}
|
||||
{% if post[2].read_access == "Everybody" %}
|
||||
{% if post[0].context.repost and post[0].context.repost.reposting %}
|
||||
{% 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) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
|
||||
<div class="card-nest">
|
||||
<div class="card small 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 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 %}
|
||||
{% if post[2].read_access == "Everybody" %}
|
||||
{% if post[0].context.repost and post[0].context.repost.reposting %}
|
||||
{% 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) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=posts|length, key="&tag=", value=tag) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue