{% extends 'home/master.twig' %} {% from 'macros.twig' import container_title %} {% from '_layout/input.twig' import input_text %} {% from 'user/macros.twig' import user_card %} {% from 'forum/macros.twig' import forum_topic_listing, forum_post_listing %} {% from 'news/macros.twig' import news_preview %} {% set title = search_query|length < 1 ? 'Search' : 'Looking for ' ~ search_query %} {% set canonical_url = url('search-query', {'query': search_query}) %} {% block content %}
{{ input_text('q', 'search__input__text', search_query, 'text', 'What are you looking for?', false, null, 1, true, true) }}
{% if forum_topics|length > 0 or forum_posts|length > 0 or users|length > 0 or news_posts|length > 0 %}
{% if forum_topics|length > 0 %}
Topics ({{ forum_topics|length|number_format }})
{% endif %} {% if forum_posts|length > 0 %}
Posts ({{ forum_posts|length|number_format }})
{% endif %} {% if users|length > 0 %}
Users ({{ users|length|number_format }})
{% endif %} {% if news_posts|length > 0 %}
News ({{ news_posts|length|number_format }})
{% endif %}
{% endif %}
{% if search_query is not empty and not ( forum_topics|length > 0 or forum_posts|length > 0 or users|length > 0 or news_posts|length > 0 ) %}
Nothing found!
No results found using that query, try something else!
{% endif %} {% if forum_topics|length > 0 %}
{{ forum_topic_listing(forum_topics, 'Topics (%d)'|format(forum_topics|length)) }} {% endif %} {% if forum_posts|length > 0 %}
{{ container_title(' Posts (%s)'|format(forum_posts|length|number_format)) }} {{ forum_post_listing(forum_posts) }}
{% endif %} {% if users|length > 0 %}
{{ container_title(' Users (%s)'|format(users|length|number_format)) }}
{% for user in users %}
{{ user_card(user) }}
{% endfor %}
{% endif %} {% if news_posts|length > 0 %}
{{ container_title(' News (%s)'|format(news_posts|length|number_format)) }} {% for post in news_posts %} {{ news_preview(post) }} {% endfor %}
{% endif %} {% endblock %}