add: finish ui rewrite
This commit is contained in:
parent
e9846016e6
commit
5dec98d698
119 changed files with 8776 additions and 9350 deletions
|
@ -1,43 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Latest posts - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="all") }} {{
|
||||
macros::timelines_secondary_nav(posts="/all", questions="/all/questions") }}
|
||||
{% if not user -%}
|
||||
<div class="card-nest">
|
||||
<div class="card small flex items-center gap-2">
|
||||
{{ icon "heart" }}
|
||||
<b>{{ text "general:label.better_with_account" }}</b>
|
||||
</div>
|
||||
|
||||
<div class="card flex gap-2">
|
||||
<a href="/auth/login" class="button">
|
||||
{{ icon "log-in" }}
|
||||
<span>{{ text "auth:action.login" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/auth/register" class="button secondary">
|
||||
{{ icon "user-plus" }}
|
||||
<span>{{ text "auth:action.register" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for post in list %}
|
||||
{% 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) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
35
crates/app/src/public/html/timelines/all.lisp
Normal file
35
crates/app/src/public/html/timelines/all.lisp
Normal file
|
@ -0,0 +1,35 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Latest posts - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"all\") }} {{ macros::timelines_secondary_nav(posts=\"/all\", questions=\"/all/questions\") }} {% if not user -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
(text "{{ icon \"heart\" }}")
|
||||
(b
|
||||
(text "{{ text \"general:label.better_with_account\" }}")))
|
||||
(div
|
||||
("class" "card flex gap-2")
|
||||
(a
|
||||
("href" "/auth/login")
|
||||
("class" "button")
|
||||
(text "{{ icon \"log-in\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.login\" }}")))
|
||||
(a
|
||||
("href" "/auth/register")
|
||||
("class" "button secondary")
|
||||
(text "{{ icon \"user-plus\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.register\" }}")))))
|
||||
(text "{%- endif %}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for post in list %} {% 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) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }} {%- endif %} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Latest questions - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="all") }} {{
|
||||
macros::timelines_secondary_nav(posts="/all", questions="/all/questions",
|
||||
selected="questions") }}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for question in list %}
|
||||
{{ components::global_question(question=question, can_manage_questions=false, secondary=true) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
13
crates/app/src/public/html/timelines/all_questions.lisp
Normal file
13
crates/app/src/public/html/timelines/all_questions.lisp
Normal file
|
@ -0,0 +1,13 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Latest questions - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"all\") }} {{ macros::timelines_secondary_nav(posts=\"/all\", questions=\"/all/questions\", selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,24 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Following - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="following") }} {{
|
||||
macros::timelines_secondary_nav(posts="/following",
|
||||
questions="/following/questions") }}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for post in list %}
|
||||
{% 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) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
13
crates/app/src/public/html/timelines/following.lisp
Normal file
13
crates/app/src/public/html/timelines/following.lisp
Normal file
|
@ -0,0 +1,13 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Following - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"following\") }} {{ macros::timelines_secondary_nav(posts=\"/following\", questions=\"/following/questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for post in list %} {% 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) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }} {%- endif %} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Following (questions) - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="following") }} {{
|
||||
macros::timelines_secondary_nav(posts="/following",
|
||||
questions="/following/questions", selected="questions") }}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for question in list %}
|
||||
{{ components::global_question(question=question, can_manage_questions=false, secondary=true) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
|
@ -0,0 +1,13 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Following (questions) - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"following\") }} {{ macros::timelines_secondary_nav(posts=\"/following\", questions=\"/following/questions\", selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,40 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>{{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav(selected="home") }}
|
||||
<main class="flex flex-col gap-2">
|
||||
<!-- prettier-ignore -->
|
||||
{{ macros::timelines_nav(selected="home") }} {{
|
||||
macros::timelines_secondary_nav(posts="/", questions="/questions") }}
|
||||
|
||||
{% if list|length == 0 and page == 0 -%}
|
||||
<div class="card-nest">
|
||||
<div class="card">
|
||||
<b>✨ Welcome to <i>{{ config.name }}</i>!</b>
|
||||
</div>
|
||||
|
||||
<div class="card no_p_margin">
|
||||
<p>Join some communities to populate your home timeline!</p>
|
||||
<p>
|
||||
You can get started by
|
||||
<a href="/communities/search"
|
||||
>searching for a community to join!</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for post in list %}
|
||||
{% 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) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
{%- endif %}
|
||||
</main>
|
||||
{% endblock %}
|
33
crates/app/src/public/html/timelines/home.lisp
Normal file
33
crates/app/src/public/html/timelines/home.lisp
Normal file
|
@ -0,0 +1,33 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "{{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"home\") }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"home\") }} {{ macros::timelines_secondary_nav(posts=\"/\", questions=\"/questions\") }} {% if list|length == 0 and page == 0 -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "✨ Welcome to ")
|
||||
(i
|
||||
(text "{{ config.name }}"))
|
||||
(text "!")))
|
||||
(div
|
||||
("class" "card no_p_margin")
|
||||
(p
|
||||
(text "Join some communities to populate your home timeline!"))
|
||||
(p
|
||||
(text "You can get started by ")
|
||||
(a
|
||||
("href" "/communities/search")
|
||||
(text "searching for a community to join!")))))
|
||||
(text "{% else %}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for post in list %} {% 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) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}"))
|
||||
(text "{%- endif %}"))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>From my communities (questions) - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="home") }} {{
|
||||
macros::timelines_secondary_nav(posts="/", questions="/questions",
|
||||
selected="questions") }}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for question in list %}
|
||||
{{ components::global_question(question=question, can_manage_questions=false, secondary=true) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
13
crates/app/src/public/html/timelines/home_questions.lisp
Normal file
13
crates/app/src/public/html/timelines/home_questions.lisp
Normal file
|
@ -0,0 +1,13 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "From my communities (questions) - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"home\") }} {{ macros::timelines_secondary_nav(posts=\"/\", questions=\"/questions\", selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,24 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Popular - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav(selected="popular") }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="popular") }} {{
|
||||
macros::timelines_secondary_nav(posts="/popular",
|
||||
questions="/popular/questions") }}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for post in list %}
|
||||
{% 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) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
13
crates/app/src/public/html/timelines/popular.lisp
Normal file
13
crates/app/src/public/html/timelines/popular.lisp
Normal file
|
@ -0,0 +1,13 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Popular - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"popular\") }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"popular\") }} {{ macros::timelines_secondary_nav(posts=\"/popular\", questions=\"/popular/questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for post in list %} {% 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) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }} {%- endif %} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Popular (questions) - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="popular") }} {{
|
||||
macros::timelines_secondary_nav(posts="/popular",
|
||||
questions="/popular/questions", selected="questions") }}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% for question in list %}
|
||||
{{ components::global_question(question=question, can_manage_questions=false, secondary=true) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
13
crates/app/src/public/html/timelines/popular_questions.lisp
Normal file
13
crates/app/src/public/html/timelines/popular_questions.lisp
Normal file
|
@ -0,0 +1,13 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Popular (questions) - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"popular\") }} {{ macros::timelines_secondary_nav(posts=\"/popular\", questions=\"/popular/questions\", selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
||||
(text "{% endblock %}")
|
|
@ -1,82 +0,0 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Search - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="search") }}
|
||||
<div class="card-nest w-full">
|
||||
<div class="card small flex items-center justify-between gap-2">
|
||||
<div class="flex items-center gap-2">
|
||||
{{ icon "search" }} {% if not profile -%}
|
||||
<span>{{ text "general:link.search" }}</span>
|
||||
{% else %}
|
||||
<span>{{ components::full_username(user=profile) }}</span>
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card w-full flex flex-col gap-2">
|
||||
{% if not profile and not user.permissions|has_supporter -%} {{
|
||||
components::supporter_ad(body="Become a supporter for full-site
|
||||
search!") }} {% else %}
|
||||
<form class="flex flex-col gap-2">
|
||||
<div class="flex flex-row gap-2">
|
||||
<input
|
||||
type="text"
|
||||
name="query"
|
||||
id="query"
|
||||
required
|
||||
value="{{ query }}"
|
||||
placeholder="{% if profile -%}Search {{ profile.username }}'s posts{% else %}Search all posts{%- endif %}"
|
||||
autocomplete="off"
|
||||
/>
|
||||
|
||||
{% if profile -%}
|
||||
<input
|
||||
type="text"
|
||||
class="hidden"
|
||||
value="{{ profile.id }}"
|
||||
name="profile"
|
||||
id="profile"
|
||||
/>
|
||||
{%- endif %}
|
||||
|
||||
<div class="flex gap-2 flex-row">
|
||||
<button class="small square">
|
||||
{{ icon "search" }}
|
||||
</button>
|
||||
|
||||
{% if config.manuals.search_help -%}
|
||||
<a
|
||||
class="button small square secondary"
|
||||
title="Search help"
|
||||
href="{{ config.manuals.search_help }}"
|
||||
target="_blank"
|
||||
>
|
||||
{{ icon "circle-help" }}
|
||||
</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{%- endif %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{% for post in list %}
|
||||
{% 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) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if profile -%}
|
||||
{{ components::pagination(page=page, items=list|length, key="&profile=" ~ profile.id, value="&query=" ~ query) }}
|
||||
{% else %}
|
||||
{{ components::pagination(page=page, items=list|length, key="&query=" ~ query) }}
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
61
crates/app/src/public/html/timelines/search.lisp
Normal file
61
crates/app/src/public/html/timelines/search.lisp
Normal file
|
@ -0,0 +1,61 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Search - {{ config.name }}"))
|
||||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"search\") }}")
|
||||
(div
|
||||
("class" "card-nest w-full")
|
||||
(div
|
||||
("class" "card small flex items-center justify-between gap-2")
|
||||
(div
|
||||
("class" "flex items-center gap-2")
|
||||
(text "{{ icon \"search\" }} {% if not profile -%}")
|
||||
(span
|
||||
(text "{{ text \"general:link.search\" }}"))
|
||||
(text "{% else %}")
|
||||
(span
|
||||
(text "{{ components::full_username(user=profile) }}"))
|
||||
(text "{%- endif %}")))
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% if not profile and not user.permissions|has_supporter -%} {{ components::supporter_ad(body=\"Become a supporter for full-site search!\") }} {% else %}")
|
||||
(form
|
||||
("class" "flex flex-col gap-2")
|
||||
(div
|
||||
("class" "flex flex-row gap-2")
|
||||
(input
|
||||
("type" "text")
|
||||
("name" "query")
|
||||
("id" "query")
|
||||
("required" "")
|
||||
("value" "{{ query }}")
|
||||
("placeholder" "{% if profile -%}Search {{ profile.username }}'s posts{% else %}Search all posts{%- endif %}")
|
||||
("autocomplete" "off"))
|
||||
(text "{% if profile -%}")
|
||||
(input
|
||||
("type" "text")
|
||||
("class" "hidden")
|
||||
("value" "{{ profile.id }}")
|
||||
("name" "profile")
|
||||
("id" "profile"))
|
||||
(text "{%- endif %}")
|
||||
(div
|
||||
("class" "flex gap-2 flex-row")
|
||||
(button
|
||||
("class" "small square")
|
||||
(text "{{ icon \"search\" }}"))
|
||||
(text "{% if config.manuals.search_help -%}")
|
||||
(a
|
||||
("class" "button small square secondary")
|
||||
("title" "Search help")
|
||||
("href" "{{ config.manuals.search_help }}")
|
||||
("target" "_blank")
|
||||
(text "{{ icon \"circle-help\" }}"))
|
||||
(text "{%- endif %}"))))
|
||||
(text "{%- endif %}")
|
||||
(text "{% for post in list %} {% 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) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2]) }} {%- endif %} {%- endif %} {% endfor %} {% if profile -%} {{ components::pagination(page=page, items=list|length, key=\"&profile=\" ~ profile.id, value=\"&query=\" ~ query) }} {% else %} {{ components::pagination(page=page, items=list|length, key=\"&query=\" ~ query) }} {%- endif %}"))))
|
||||
|
||||
(text "{% endblock %}")
|
Loading…
Add table
Add a link
Reference in a new issue