{% 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 members|length > 0 or news_posts|length > 0 %}
{% if forum_topics|length > 0 %}
Topics
{% endif %} {% if forum_posts|length > 0 %}
Posts
{% endif %} {% if members|length > 0 %}
Members
{% endif %} {% if news_posts|length > 0 %}
News
{% endif %}
{% endif %}
{% if search_query is not empty and not ( forum_topics|length > 0 or forum_posts|length > 0 or members|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)) }} {% if forum_topics|length >= 20 %}
Load next 20 topics...
{% endif %} {% endif %} {% if forum_posts|length > 0 %}
{{ container_title(' Posts (%s)'|format(forum_posts|length|number_format)) }} {{ forum_post_listing(forum_posts) }}
{% if forum_posts|length >= 20 %}
Load next 20 posts...
{% endif %} {% endif %} {% if members|length > 0 %}
{{ container_title(' Members (%s)'|format(members|length|number_format)) }} {% if members|length >= 20 %}
Load next 20 members...
{% endif %}
{% endif %} {% if news_posts|length > 0 %}
{{ container_title(' News (%s)'|format(news_posts|length|number_format)) }} {% for post in news_posts %} {{ news_preview(post, true) }} {% endfor %}
{% endif %} {% endblock %}