github.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. {% include 'hackathon/base.html' %}
  5. <style>
  6. .form-signin {
  7. max-width: 550px;
  8. padding: 15px;
  9. margin: 0 auto;
  10. }
  11. </style>
  12. <h1 class="text-center"> Github User Data </h1>
  13. <div class="container text-center">
  14. <form class="form-signin" id="login_form" method="post" action="/hackathon/githubUser/">
  15. {% csrf_token %}
  16. {% load bootstrap %}
  17. <br>
  18. <input type="text" name="user" class="form-control" placeholder="Github User Name, e.g: DrkSephy" value="" required autofocus>
  19. <br>
  20. <button class="btn btn-lg btn-primary btn-block" type="submit">Get Data</button>
  21. <input type="hidden" name="submit" value="submit" />
  22. </form>
  23. </div>
  24. {% if data %}
  25. <div class="col-lg-12">
  26. <div class="table-responsive">
  27. <table class="table table-bordered table-hover table-striped tablesorter">
  28. <thead>
  29. <tr>
  30. <th class="header"> Username <i class="icon-sort"></i></th>
  31. <th class="header"> Blog <i class="icon-sort"></i></th>
  32. <th class="header"> Public Repos <i class="icon-sort"></i></th>
  33. <th class="header"> Public Gists <i class="icon-sort"></i></th>
  34. <th class="header"> Email <i class="icon-sort"></i></th>
  35. <th class="header"> Followers <i class="icon-sort"></i></th>
  36. <th class="header"> Following <i class="icon-sort"></i></th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. {% for key in data.userData %}
  41. <tr>
  42. <td>{{ key.name }}</td>
  43. <td>{{ key.blog }}</td>
  44. <td>{{ key.public_repos }}</td>
  45. <td>{{ key.public_gists }}</td>
  46. <td>{{ key.email }}</td>
  47. <td>{{ key.followers }}</td>
  48. <td>{{ key.following }}</td>
  49. </tr>
  50. {% endfor %}
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. {% endif %}
  56. </body>
  57. </html>