{% extends "base.html" %}

{% block title %}Search{% endblock  %}

{% block script %}
$( document ).ready(function() {
    loadTweetContainer("tweet-container")
});
{% endblock script %}

{% block content %}

<br>
<div class="row">
    <div class="col-sm-12">
        {% if request.GET.q %}
            <p class='lead'>Results for {{ request.GET.q }}</p>
            <hr/>
        {% endif %}
    </div>
    <div class="col-sm-9">
        <h1>Tweets</h1>
        <hr/>
        <div id="tweet-container"  data-url="/api/search/">
        </div>
        <span id="loadmore">Load More ... </span>
        <br>
    </div>
    <div class="col-sm-3">
        <h1>Users</h1><hr/>
        {% for user in users %}
            <a href='/{{ user.username }}/'>{{user.username}}</a><br>
        {% empty %}
        <p>No Users found</p>
        {% endfor %}
    </div>
</div>

{% endblock content %}

