{% extends "base.html" %}

{% block body %}
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <h1>Conversion</h1>
            <div class="row">
                <p>Test conversion to thumbnail.</p>
                <form action="" method="GET">
                    <div class="col-sm-7 col-md-7">
                        <div class="input-group input-group-lg">
                            <span class="input-group-addon" id="sizing-addon1">Foreign resource</span>
                            <input type="text" value="{{ form.res_url }}" name="res_url" class="form-control" placeholder="http://url.to/resource" aria-describedby="sizing-addon1">
                        </div>
                    </div>
                    <div class="col-sm-4 col-md-4">
                        <div class="input-group input-group-lg">
                            <input value="{{ form.thumb_width }}" name="thumb_width" type="text" class="form-control" placeholder="200" aria-describedby="sizing-addon1">
                            <span class="input-group-addon" id="sizing-addon1">x</span>
                            <input value="{{ form.thumb_height }}" name="thumb_height" type="text" class="form-control" placeholder="200" aria-describedby="sizing-addon1">
                        </div>
                    </div>
                    <div class="col-sm-1 col-md-1">
                        <button type="submit" class="btn btn-default btn-lg">&rarr;</button>
                    </div>
                </form>
            </div>

            <div class="row" style="margin-top: 10px">
                <div class="col-sm-6">
                    <img
                        src="{{ thumb_src }}"
                        width="{{ form.thumb_width }}"
                        height="{{ form.thumb_height }}"
                        omnic-thumb
                    />
                </div>
                <div class="col-sm-6">
<pre>
&lt;img omnic-thumb
    src="{{ thumb_src }}"
    width="{{ form.thumb_width }}" height="{{ form.thumb_height }}" /&gt;
</pre>
                </div>
            </div>

            <h1>Workers</h1>
            <div class="row">
                {% for worker in workers %}
                <div class="col-sm-3 col-md-3">
                    <div class="thumbnail">
                        <h1>{{ worker.queue_size }}</h1>
                        <div class="caption">
                            <h3>Worker [{{ worker.number }}]</h3>
                        </div>
                    </div>
                </div>
                {% endfor %}
            </div>
        </div>
    </div>
</div>

{#
<script>
    $(document).ready(function () {
        // TODO

    });
</script>
#}
{% endblock body %}
