-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·415 lines (373 loc) · 16.6 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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no">
<meta name="description" content="Daniel Philip Johnson React Developer
Twitch json API project">
<meta name="keywords" content="Twitch json API project, Freecodecamp React
Developer, Web Development, angularjs
Web Applications, Mobile Apps">
<meta name="author" content="Daniel Philip Johnson">
<!-- Facebook tags -->
<meta property="og:title" content="Freecodecamp project: Twitch json API project">
<meta property="og:description" content="Twitch json API project using anuglar
and
html">
<meta property="og:image"
content="https://pbs.twimg.com/profile_images/1288051154413379591/tUGJS2vc_400x400.jpg">
<meta property="og:url"
content="https://danielphilipjohnson.github.io/ffc/">
<meta name="twitter:card" content="summary_large_image">
<!-- Non-Essential, But Recommended -->
<meta property="og:site_name" content="Freecodecamp project: Twitch json API project">
<meta name="twitter:image:alt" content="Profile of React Developer Daniel
Philip Johnson">
<!-- Twitter Tags --> <meta name="description" content="Daniel Philip Johnson React Developer
Twitch json API project">
<meta name="keywords" content="Twitch json API project, Freecodecamp React
Developer, Web Development, angularjs
Web Applications, Mobile Apps">
<meta name="author" content="Daniel Philip Johnson">
<!-- Facebook tags -->
<meta property="og:title" content="Freecodecamp project: Twitch json API project">
<meta property="og:description" content="Twitch json API project using anuglar
and
html">
<meta property="og:image"
content="https://pbs.twimg.com/profile_images/1288051154413379591/tUGJS2vc_400x400.jpg">
<meta property="og:url"
content="https://danielphilipjohnson.github.io/ffc/">
<meta name="twitter:card" content="summary_large_image">
<!-- Non-Essential, But Recommended -->
<meta property="og:site_name" content="Freecodecamp project: Twitch json API project">
<meta name="twitter:image:alt" content="Profile of React Developer Daniel
Philip Johnson">
<!-- Twitter Tags -->
<meta name="twitter:title" content="Freecodecamp project:Twitch json API project">
<meta name="twitter:description" content="Freecodecamp project. Twitch json API project">
<meta name="twitter:image"
content="https://pbs.twimg.com/profile_images/1288051154413379591/tUGJS2vc_400x400.jpg">
<meta name="twitter:card" content="Twitter Profile">
<meta name="twitter:title" content="Freecodecamp project:Twitch json API project">
<meta name="twitter:description" content="Freecodecamp project. Twitch json API project">
<meta name="twitter:image"
content="https://pbs.twimg.com/profile_images/1288051154413379591/tUGJS2vc_400x400.jpg">
<meta name="twitter:card" content="Twitter Profile">
<title>Twitch Viewer</title>
<link rel="preconnect">
<link rel="stylesheet"
href="./css/bootstrap4.min.css">
<link rel="stylesheet" href="./css/main.min.css">
<link defer rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog=="crossorigin="anonymous"
/>
</head>
<body data-spy="scroll" data-target="#basic-nav" ng-app="twitchApp">
<nav class="navbar navbar-expand-lg fixed-top navbar-light bg-light">
<a class="navbar-brand" href="#">
<img
src="https://raw.githubusercontent.com/danielphilipjohnson/Free-Code-Camp-Portfolio-2018-2019/master/2.Front-End-Libraries-Certification/Legacy%20Projects/Twitch.tv-JSON-API/img/logo-twitch.png"
width="32" height="30"
class="d-inline-block align-top" alt="twitch viewer logo"
loading="lazy">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav w-100 justify-content-between">
<ul class="nav">
<li class="nav-item">
<a class="nav-link active font-weight-bold pr-2" href="#">Browse</a>
</li>
<li class="nav-item">
<a class="nav-link font-weight-bold pr-2" href="#">Esports</a>
</li>
<li class="nav-item">
<a class="nav-link font-weight-bold pr-2" href="#">Music</a>
</li>
</ul>
<form class="form-inline">
<input class="form-control mr-sm-2" type="search"
placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
<ul class="nav">
<li class="nav-item">
<button type="button" class="btn btn-secondary mr-2">Log in</button>
</li>
<li class="nav-item">
<button type="button" class="btn btn-primary">#</button>
</li>
</ul>
</div>
</div>
</nav>
<main class="d-flex mt-5">
<aside class="w-18 vh-100 pt-3">
<h6 class="text-uppercase pt-2 pl-3 d-none d-lg-block d-xl-none">Popular
Channels</h6>
<ul class="list-group" ng-controller="PopularLiveGameComponent">
<li class="list-group-item border-0 p-0 pt-2 pl-2 bg-transparent"
ng-repeat="game in popularlivegames">
<div class="media">
<img src="{{game.image}}" width="30"
height="33" class="mr-3 rounded-circle" alt="user">
<div class="media-body pr-2 d-none d-lg-block">
<h5 class="m-0 font-weight-bold username">{{game.username}}
<span class="live rounded-circle bg-danger"></span>
<span class="viewers font-weight-normal">{{game.viewers}}</span>
</h5>
<p class="text-muted gametitle">{{game.game}}</p>
</div>
</div>
</li>
</ul>
</aside>
<div class="w-82 pt-3 pl-1 content">
<div class="card-group d-grid grid-column-1" id="channel"
ng-controller="ChannelController">
<div class="card mb-3 mr-1 {{channel.onlinestatus}}"
ng-repeat="channel in
channelsModel" data-status="{{channel.onlinestatus}}">
<div class="channel-live" ng-if="channel.onlinestatus === 'Online'">
<img class="card-img-top" ng-src="{{channel.video_banner}}"
alt="user logo">
<div class="card-block pl-2 pt-3 pb-3">
<div class="d-flex">
<div class="d-flex flex-column">
<img class="logo rounded-circle border border-danger p-1
mb-1" src="{{channel.logo}}" alt="Channel Logo">
{{channel.channelLogo}}
<span class="badge badge-danger">Live</span>
</div>
<div class="pl-4">
<h4 class="card-title mb-0">
<a href="{{channel.url}}">{{channel.display_name}}</a>
</h4>
<p class="status">{{channel.status}}</p>
<p class="mb-0">{{channel.followers}}
followers</p>
<p class="mb-0">{{channel.views}}
Viewers</p>
</div>
</div>
<div class="d-flex flex-row">
<div class="stream-modal" ng-if="channel.onlinestatus ===
'Online'">
<a href="#" class="follow-button btn-follow
btn-square" data-toggle="modal"
data-target="#{{channel.name}}">
<span>🎮
</span>Live</a>
</div>
</div>
</div>
</div>
<div class="channel-offline" ng-if="channel.onlinestatus !==
'Online'">
<img class="card-img-top" ng-src="{{channel.video_banner}}"
alt="user banner">
<div class="card-block pl-2 pt-3 pb-3">
<div class="d-flex">
<img class="logo rounded-circle border p-1"
src="{{channel.logo}}" alt="Channel Logo">
{{channel.channelLogo}}
<div class="pl-4">
<h4 class="card-title mb-0">
<a href="{{channel.url}}">{{channel.display_name}}</a>
</h4>
<p class="status">{{channel.status}}</p>
<p class="mb-0">{{channel.followers}}
followers</p>
<p class="mb-0">{{channel.views}}
Viewers</p>
</div>
</div>
<div class="d-flex flex-row">
<div class="p-2 stream-modal" ng-if="channel.onlinestatus ===
'Online'">
<a href="#" class="follow-button btn-follow
btn-square" data-toggle="modal"
data-target="#{{channel.name}}">
<span>🎮
</span>Stream
Info</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="popular-live-channels border-bottom border-secondary mb-3
pl-3" id="popular-live-channels">
<h4>Popular live channels</h4>
<div class="card-group d-flex flex-column justify-content-center
align-items-start" ng-controller="LiveGameComponent">
<div class="game-card col mb-3 pb-4 pr-2" ng-repeat="game in
livegames">
<img class="card-img rounded-0" src="{{game.image}}"
alt="{{game.title}}">
<div class="card-block">
<h6 class="card-title pt-2 mb-1">{{game.title}}</h6>
<h6 class="card-title text-muted mb-0">{{game.username}}</h6>
<div class="tags">
<span ng-repeat="tag in game.tags" class="badge
badge-secondary
mr-1">{{tag}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="fave-game border-bottom border-secondary mb-3 pl-3"
id="fave-games">
<h4>Popular categories</h4>
<div class="card-group d-flex flex-column justify-content-center
align-items-start" ng-controller="FavGameComponent">
<div class="fave-card col mb-3 pb-4 pr-2" ng-repeat="game in games">
<img class="card-img rounded-0" src="{{game.image}}"
alt="{{game.title}}">
<div class="card-block">
<h5 class="card-title pt-2 mb-1">{{game.title}}</h5>
<h6 class="card-title text-muted">{{game.viewers}}
viewers</h6>
<div class="tags">
<span ng-repeat="tag in game.tags" class="badge
badge-secondary
mr-1">{{tag}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="main-footer text-center text-white p-1">
<div class="container">
<div class="footer-top d-grid grid-column-1 align-items-center
justify-items-center border-bottom border-light pt-3 pb-3 w-min-768">
<div class="sitemap d-flex">
<p class="p-3">
<a class="text-white font-weight-bold pb-2" href="#">Browse</a>
</p>
<p class="p-3">
<a class="text-white font-weight-bold pb-2" href="#">Esport</a>
</p>
<p class="p-3">
<a class="text-white font-weight-bold pb-2" href="#">Music</a>
</p>
</div>
<ul class="social-icons pl-0 d-flex justify-content-center flex-wrap
no-list text-white">
<li class="nav-item m-2 twitter text-center">
<a class="text-white" href="https://twitter.com/danielp_johnson"
target="_blank" rel="noopener">
<i class="fab fa-twitter"></i>
</a>
</li>
<li class="nav-item m-2 facebook text-center">
<a class="text-white"
href="https://www.facebook.com/DanielPhilipJohnson"
target="_blank" rel="noopener">
<i class="fab fa-facebook"></i>
</a>
</li>
<li class="nav-item m-2 github text-center">
<a class="text-white"
href="https://github.com/danielphilipjohnson/" target="_blank"
rel="noopener">
<i class="fab fa-github"></i>
</a>
</li>
<li class="nav-item m-2 linkedin text-center">
<a class="text-white"
href="https://www.linkedin.com/in/daniel-philip-johnson/"
target="_blank" rel="noopener">
<i class="fab fa-linkedin"></i>
</a>
</li>
</ul>
</div>
<div class="footer-bottom grid-column-1 text-center pt-5 pb-5
position-relative d-grid">
<p>Copyright ©
<span id="year">2020.</span>
All Rights Reserved | Designed
and built with
</p>
<div class="p-5">
<div class="heart"></div>
</div>
<p>
by
<a class="author" href="">Daniel Philip Johnson
</a>
</p>
</div>
</div>
</footer>
<!-- insert modals-->
<div class="stream" ng-controller="ChannelController">
<div ng-repeat="stream in streamModel">
<div class="modal fade" id="{{stream.stream.channel.name}}"
tabindex="-1" role="dialog" arbundleia-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header p-1">
<button type="button" class="close modal-close"
data-dismiss="modal" aria-label="Close"> <span
aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body p-0">
<div class="player">
<img class="img-responsive stream-logo"
src="{{stream.stream.channel.logo}}" alt="stream-logo">
<div class="stream-info m-2 col">
<h3 class="stream-channel-name">
<a href="#">{{stream.stream.channel.name}}</a>
</h3>
<p class="status">{{stream.stream.channel.status}}</p>
<p>
<span>🎮</span>
Playing:
{{stream.stream.game}}</p>
<p>
<span>👁
</span>Views:
{{stream.stream.viewers}}</p>
<button class="btn btn-outline-info" data-dismiss="modal">Close</button>
<button class="btn btn-outline-primary">
<a href="{{stream.stream.channel.url}}">Watch</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end of modal -->
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.min.js"></script>
<script src="./js/app.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx"
crossorigin="anonymous"></script>
</body>
</body>
</html>