1.1 KiB · text History 1974764
{% extends "root.html" %}

{% block content %}
<div class="space-y-4 text-left">
  <div class="flex flex-wrap items-center justify-between gap-3"><h1 class="text-3xl font-bold">Search</h1>{% set toggle_base = "/search?q=" ~ (q|urlencode) %}{% set view_mode = "classic" %}{% include "forum/_view_toggle.html" %}</div>
  <form method="get" action="/search" class="join w-full max-w-xl">
    <input name="q" value="{{ q }}" placeholder="Search topics, posts, tags…" minlength="3" required
           title="Type at least 3 characters"
           class="input input-bordered join-item w-full" autofocus/>
    <button class="btn btn-primary join-item" type="submit">Search</button>
  </form>

  {% if too_short %}
    <p class="opacity-70" data-too-short>Type at least {{ min_chars }} characters.</p>
  {% elif q %}
    {% if topics|length == 0 %}
      <p class="opacity-70">No results for &ldquo;{{ q }}&rdquo;.</p>
    {% else %}
      <p class="opacity-70 text-sm">Results for &ldquo;{{ q }}&rdquo;:</p>
      {% include "forum/_topic_list.html" %}
    {% endif %}
  {% endif %}
</div>
{% endblock %}