<!DOCTYPE html>
<html>
<body>
	{% include 'hackathon/base.html' %}
    <style>
      .form-signin {
        max-width: 550px;
        padding: 15px;
        margin: 0 auto;
      }    
    </style>

    <h1 class="text-center"> Github Top Repositories </h1>

    <div class="container text-center">
        <form class="form-signin" id="login_form" method="post" action="/hackathon/githubTopRepositories/">
          {% csrf_token %}
          {% load bootstrap %}
          <br>
          <input type="text" name="user" class="form-control" placeholder="Github User Name, e.g: DrkSephy" value="" required autofocus>
          <br>
          <button class="btn btn-lg btn-primary btn-block" type="submit">Get Top Contributions </button>
          <input type="hidden" name="submit" value="submit" />
        </form>
    </div>
	
        <div class="col-lg-12">
            <div class="table-responsive">
                <table class="table table-bordered table-hover table-striped tablesorter">
                    <thead>
                    <tr>
                    <th class="header"> Repository <i class="icon-sort"></i></th>
                    <th class="header"> Total <i class="icon-sort"></i></th>
                    </tr>
                </thead>
                <tbody>

                {% for key in data.committed %}
                    <tr>
                        <td>{{ key.repo_name }}</td>
                        <td>{{ key.total }}</td>
                    </tr>
                {% endfor %}

                </tbody>
                </table>
            </div>
        </div>

</body>
</html>
