{% extends "layout.html" %}
{% set current_page = "home" %}
{% set title = "OD-Database - Home" %}

{% block body %}

    <div class="container">
        <div class="jumbotron">
            <h1 class="text-monospace" style="font-size: 3.5rem;">OD-Database</h1>

            {% if stats and stats["total_size"] %}
                <p class="lead">{{ stats["total_count"] }} files totalling
                    ~{{ stats["total_size"] | filesizeformat }} from {{ stats["website_count"] }} websites</p>
            {% else %}
                <p class="lead">We are currently experiencing a high volume of traffic. The search function
                    may be unresponsive.</p>
            {% endif %}
            <p></p>
        </div>
    </div>
    <div class="container">

        <div class="card">
            <div class="card-header">Search</div>
            <div class="card-body">
                <form action="/search" id="sfrm">

                    <div class="form-row">
                        <div class="col-md-11">
                            <input class="form-control" name="q" id="q" placeholder="Query">
                        </div>
                        <div class="col-md-1">
                            <input class="btn btn-primary btn-shadow" type="submit" value="Search">
                        </div>
                    </div>
                    {% if show_captcha %}
                        {{ captcha.get_code()|safe }}
                    {% endif %}
                </form>
            </div>
        </div>

        <div class="card">
            <div class="card-header">About</div>
            <div class="card-body">
                <p>Web frontend and backend by <a href="https://github.com/simon987">simon987</a>,
                    HTTP crawler by <a href="https://github.com/terorie">terorie</a>,
                    hosting provided by <a href="https://the-eye.eu/">The eye</a>
                </p>
            </div>
        </div>

    </div>

    <a href="https://github.com/simon987">
        <img class="github-banner" src="/static/img/forkme_right_white_ffffff.png" alt="Fork me on GitHub">
    </a>
{% endblock body %}
