-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
249 lines (230 loc) · 8.29 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Sort instagram photos">
<meta name="author" content="4_pr0n">
<link rel="shortcut icon" href="favicon.png">
<title>InstaTop</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/bootstrap-theme.min.css">
<link rel="stylesheet" href="./css/toastr.css">
<link rel="stylesheet" href="./css/bootstrap-slate.min.css">
<link rel="stylesheet" href="./css/main.css">
<script src="./js/jquery-1.11.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="./js/toastr.js"></script>
<script src="./js/knockout-3.3.0.debug.js"></script>
<script src="./js/main.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./" style="position: relative; top: -10px">
<img src="./images/icon-xxs.png" style="line-height: 0px" />
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="dropdown" data-bind="if: recents().length > 0">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Recent <i class="caret"></i>
</a>
<ul class="dropdown-menu" role="menu">
<!-- ko foreach: recents -->
<li>
<a data-bind="attr: { href: href}">
<img data-bind="attr: { src: image }" class="img-thumbnail" style="max-width: 70px; max-height: 70px" />
<span data-bind="text: name"></span>
</a>
</li>
<!-- /ko -->
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text"
class="form-control"
placeholder="instagram_username"
data-bind="value: inputUsername" />
</div>
<button class="btn btn-default"
id="submit"
data-bind="click: submit">
Submit
</button>
</form>
</div><!-- /.navbar-collapse -->
</div>
</nav>
<!-- User -->
<div class="container" data-bind="if: hasUserInfo() == true">
<!-- Header, username, etc -->
<div class="jumbotron">
<div class="container" style="display: flex; align-items: center">
<div class="col-md-3 col-md-offset-1">
<img data-bind="attr: { src: profilePicture }"
class="img-thumbnail"
alt="profile picture" />
</div>
<div class="col-md-7">
<h1 data-bind="text: username"></h1>
<blockquote data-bind="text: bio"></blockquote>
</div>
</div> <!-- /container -->
</div> <!-- /jumbotron -->
<!-- Load More -->
<div class="container">
<div class="col-xs-12" style="text-align: center">
<p>
<span data-bind="text: visiblePosts().length"></span>
of
<span data-bind="text: posts().length"></span>
loaded (<span data-bind="text: totalMedia"></span> total)
</p>
<p>
<button class="btn btn-success"
data-bind="click: loadMore,
visible: visiblePosts().length < totalMedia()">
Load More
</button>
<button class="btn btn-primary"
data-bind="click: sortByLikes,
css: { active: sortBy() == 'likes' }"
>
Sort by Likes
</button>
<button class="btn btn-primary"
data-bind="click: sortByDate,
css: { active: sortBy() == 'date' }"
>
Sort by Date
</button>
<button class="btn btn-primary"
data-bind="click: sortByWeight,
css: { active: sortBy() == 'weight' }"
>
Weighted Sort
</button>
</p>
</div>
</div>
<!-- Spinner -->
<div class="container" data-bind="if: isLoading() == true">
<div class="col-xs-12" style="text-align: center">
<img src="./images/spinner.gif" />
</div>
</div>
<!-- Photos -->
<div class="col-xs-offset-0 col-xs-12 col-md-offset-1 col-md-10 container">
<!-- ko foreach: visiblePosts -->
<div class="col-xs-5 col-sm-4 col-md-3 small" style="padding-bottom: 20px">
<button class="btn btn-default"
data-bind="click: function() { showImage(); }"
>
<div style="text-align: center" data-bind="text: createdHR"></div>
<img data-bind="attr: { src: thumbnail }" class="img-thumbnail" />
<div class="videoThumbnail" data-bind="if: type == 'video'">
<span class="glyphicon glyphicon-play"></span>
</div>
<div style="text-align: center">
<i class="glyphicon glyphicon-heart"></i>
<span data-bind="text: likes"></span>
</div>
</button>
</div>
<!-- /ko -->
</div>
</div>
<!-- Spinner -->
<div class="container" data-bind="if: isLoading() == true">
<div class="col-xs-12" style="text-align: center">
<img src="./images/spinner.gif" />
</div>
</div>
<!-- Load More -->
<div class="container" data-bind="if: posts().length > 0">
<div class="col-xs-12" style="text-align: center">
<p>
<span data-bind="text: posts().length"></span>
of
<span data-bind="text: totalMedia"></span>
loaded (<span data-bind="text: visiblePosts().length"></span> shown)
<button class="btn btn-primary"
data-bind="click: loadMore,
visible: visiblePosts().length < totalMedia()">
Load More
</button>
</p>
</div>
</div>
<!-- Main page / recents -->
<div class="container" data-bind="if: !username()">
<div class="jumbotron">
<div class="container" style="display: flex; align-items: center">
<div class="col-md-8 col-offset-2">
<img style="float:left; padding-right: 20px" src="./images/icon-md.png" />
<h1> InstaTop</h1>
<p>
This site shows the top posts for instragram users.
</p>
</div>
</div> <!-- /container -->
</div> <!-- /jumbotron -->
<div class="container" data-bind="if: recents().length > 0">
<h1 style="text-align: center">Recent Users</h1>
<!-- ko foreach: recents -->
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
<button class="btn btn-primary"
data-bind="click: function() { window.location.hash = name }"
style="width: 100%; text-align: left">
<img data-bind="attr: { src: image }" class="img-thumbnail" style="max-width: 140px; max-height: 140px" />
<span style="font-weight: bold" data-bind="text: name"></span>
</button>
</div>
<!-- /ko -->
</div>
</div> <!-- /Main page container -->
<!-- Modal -->
<div class="modal fade"
id="imageModal"
tabindex="-1"
role="dialog"
aria-labelledby="imageModalLabel"
aria-hidden="true">
<div class="modal-dialog" style="width: 80%; height: 80%">
<div class="modal-content" style="text-align: center; vertical-align: middle">
<a id="prevImage" class="arrowButton">
<i class="glyphicon glyphicon-chevron-left"></i>
</a>
<span id="imageModalContent" class="modal-body">
</span>
<a id="nextImage" class="arrowButton">
<i class="glyphicon glyphicon-chevron-right"></i>
</a>
</div>
</div>
</div>
<div class="container" style="padding-top: 50px; padding-bottom: 50px">
<i class="glyphicon glyphicon-copyright-mark"></i>
Copyright 2015 Rarchives
</div>
</body>
</html>