/
index.html
72 lines (68 loc) · 3.14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html ng-app="twitterApp">
<head>
<title>Simple Tweet Search Application</title>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="js/oauth.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-sanitize.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
<script src="js/tuit.js"></script>
<style>
.container {
margin-top: 10px;
margin-bottom: 10px;
}
#results .row {
margin-top: 15px;
margin-bottom: 15px;
}
</style>
</head>
<body>
<tuit oauth-public-key="26EfY6aIJ7KOamwK-iiy2uSoQUI" hashtag-default="#chelsea"></tuit>
<div class="container" ng-controller="TwitterController">
<h1>Simple Tweet Search Application</h1>
<div class="row">
<div class="col-xs-6">
<button ng-click="connectButton()" id="connectButton" type="button" class="btn btn-primary">Connect Twitter</button>
<button ng-click="signOut()" id="signOut" type="button" class="btn btn-link" style="display:none;">Sign Out</button>
</div>
<div class="col-xs-6">
<div class="input-group">
<input type="text" ng-model="searchTerm" class="form-control" id="searchBox" placeholder="Enter search term here" ng-show="connectedTwitter" ng-keyup="refreshHashTag()"/>
<span class="input-group-btn">
<button ng-click="refreshHashTag()" id="searchButton" type="button" class="btn btn-info" style="display:none;">
Search!
</button>
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12" id="results">
<div class="row" ng-repeat="t in tweets | filter:searchTerm">
<div class="col-xs-2 col-sm-1">
<img ng-src="{{t.user.profile_image_url}}" class="img-circle">
</div>
<div class="col-xs-10 col-sm-11">
<small>{{t.user.name}}</small>
<br> <span ng-bind-html="t.text"></span>
</div>
</div>
<div ng-show="rateLimitError">
Rate limit reached. You are making too many requests.
</div>
<div>
<input type="button" class="btn btn-info" id="load-more" ng-click="refreshHashTag(tweets[tweets.length-1].id)" ng-show="connectedTwitter" value="Load More" />
</div>
</div>
</div>
</div>
</body>
</html>