{% set search_box_value = query %}
{% set page_title = query + ' - Search' %}
{% extends "base.html" %}
{% import "common_elements.html" as common_elements %}
{% block style %}
    main > * {
        max-width: 800px;
        margin: auto;
    }
        #result-info{
            margin-top: 10px;
            margin-bottom: 10px;
            padding-left: 10px;
            padding-right: 10px;
        }
            #number-of-results{
                font-weight:bold;
            }
        .item-list{
            padding-left: 10px;
            padding-right: 10px;
        }
            .badge{
                background-color:#cccccc;
            }
{% endblock style %}

{% block main %}
            <div id="result-info">
                <div id="number-of-results">Approximately {{ '{:,}'.format(estimated_results) }} results ({{ '{:,}'.format(estimated_pages) }} pages)</div>
{% if corrections['type'] == 'showing_results_for' %}
                <div>Showing results for <a>{{ corrections['corrected_query']|safe }}</a></div>
                <div>Search instead for <a href="{{ corrections['original_query_url'] }}">{{ corrections['original_query'] }}</a></div>
{% elif corrections['type'] == 'did_you_mean' %}
                <div>Did you mean <a href="{{ corrections['corrected_query_url'] }}">{{ corrections['corrected_query']|safe }}</a></div>
{% endif %}
            </div>
            <div class="item-list">
                {% for info in results %}
                    {{ common_elements.item(info, description=true) }}
                {% endfor %}
            </div>
            <nav class="page-button-row">
                {{ common_elements.page_buttons(estimated_pages, '/https://www.youtube.com/search', parameters_dictionary) }}
            </nav>
{% endblock main %}