{% extends 'base.jinja' %}
{% block headline %}
    <h1 class="text-center"> Donar </h1>
{% endblock %}
{% block content %}
    <div class="container">
        <div class="row pt-5">
            <form type="get" action="{{ url('search-rooms') }}" style="margin: 0">
                <input id="search_room" type="text" name="search_room" placeholder="Search...">
                <button id="search_submit" type="submit">Submit</button>
            </form>
        </div>
        <div class="row mt-4">
            {% if id %}
                <h2>Ergebnisse für: {{ id }}</h2>
            {% endif %}
        </div>
        <div class="row">
            {% if rooms %}
                {% for room in  rooms %}
                    <div class="col-12 p-1">
                        <div class="p-2 border border-dark rounded-3 border border-dark rounded bg-light text-dark">
                            <a href="{{ url('show-room', args=[room.short]) }}"><p><strong>Short:</strong> {{ room.short }}</p></a>
                        </div>
                    </div>
                {% endfor %}
            {% endif %}
        </div>
    </div>
{% endblock %}
