twitter_tweet.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style type="text/css">
  5. .slice text {
  6. font-size: 16pt;
  7. font-family: Arial;
  8. }
  9. </style>
  10. </head>
  11. <body>
  12. {% include 'hackathon/base.html' %}
  13. <h1 class="text-center"> {{ title }}</h1>
  14. <br>
  15. <div class="container text-center">
  16. <form class="form-inline" method='get' action="/hackathon/twitterTweets/">
  17. <div class="form-group">
  18. <input type="text" name="tweets" class="form-control" placeholder="Input tweet, e.g: mayfield">
  19. </div>
  20. <button type="submit" class="btn btn-default">Search</button>
  21. </form>
  22. </div>
  23. <br>
  24. {% if content %}
  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"> Who <i class="icon-sort"></i></th>
  31. <th class="header"> Tweet <i class="icon-sort"></i></th>
  32. <th class="header"> Retweets <i class="icon-sort"></i></th>
  33. <th class="header"> Created <i class="icon-sort"></i></th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. {% for item in content %}
  38. <tr>
  39. <td>{{ item.user.screen_name }}</td>
  40. <td>{{ item.text }}</td>
  41. <td>{{ item.retweet_count}}</td>
  42. <td>{{ item.created_at}}</td>
  43. {% endfor %}
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. {{data}}
  49. <script type="text/javascript">
  50. var width = 300,
  51. height = 300,
  52. radius =100,
  53. color = d3.scale.category20c();
  54. </script>
  55. {% endif %}
  56. </body>
  57. </html>