{% extends "../base.html" %}

{% block head %}
    {% if query is None and feed_url %}
        <link rel="alternate" type="application/rss+xml" href="{{feed_url}}">
    {% end %}
{% end %}
{% block stylesheets %}
    <link rel="stylesheet" type="text/css"
          href="{{fix_static('css/soundboard.css')}}">
{% end %}

{% block body %}
    {% if query is None %}
        {% if feed_url %}
            <a href="{{feed_url}}" id="soundboard-rss"
               no-dynload><img src="{{fix_static('img/rss.svg')}}" alt="RSS-Feed"></a>
        {% end %}
    {% else %}
        <form>
            <input type="text" value="{{query}}" name="q">
            {% raw form_appendix %}
            <input type="submit" value="Suche!">
        </form>

        {% if len(sound_info_list) == 0 %}
            Nichts gefunden. :( <br>
            Bitte überprüfe die Rechtschreibung oder nutze eine kürzere Suche.
        {% end %}
    {% end %}
    <div>
        {% for sound_info in sound_info_list %}
            {% raw sound_info.to_html(fix_url, query) %}
        {% end %}
    </div>
{% end %}
