(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 %}")