-
Notifications
You must be signed in to change notification settings - Fork 2
/
stats.html
169 lines (156 loc) · 7.23 KB
/
stats.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ScreenTrack: using the IMDB API to display data about movies</title>
<link rel="icon" type="image/x-icon" href="images/camera.png">
<script src="./node_modules/chart.js/dist/chart.umd.js"></script>
<script type="text/javascript" src="scripts/config.js"></script> <!-- need this to be able to access the config file, needs to be placed before the rest!!-->
<script src="scripts/script.js"></script>
<script src="scripts/login.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div class="logo"><a href="./index.html"><img src="images/camera.png"></a></div>
<a href="./index.html"><h3>ScreenTrack</h3></a>
<nav class="main-nav">
<ul>
<li><a href="./top250.html">Top 250</a></li>
<li><a href="./in_theaters.html">In Theaters</a></li>
<li><a href="./stats.html" class="current">Stats</a></li>
<li><a href="./watched.html">Watched</a></li>
<li><a href="./about.html">About</a></li>
<li style="position: absolute; right: 0;"><a href="./login.html">Login</a></li>
</ul>
</nav>
</header>
<main>
<!-- will be filled with JSON data about top 250 IMDB movies, by populateMovies (script.js)-->
<section id="stats">
<!--button id="clickMe" onclick="getUserStats()">HELLO</button-->
<!--/section-->
<section class="row">
<div class="column">
<p id="textStats">
<span id="days"></span> days
<span id="hours"></span> hours
<span id="minutes"></span> minutes
</p>
</div>
<div class="column">
<p id="textStats">
<span id="watched"></span> movies watched
</p>
</div>
</section>
<section class="row">
<div class="column">
<h3 class="statTitle">Movies watched per release year</h3>
<section class="stats-container years-container">
<canvas id="years"></canvas> <!--width="50" heigth="50" padding="50"-->
</section>
</div>
<div class="column column-thirds">
<h3 class="statTitle">Top 6 stars of watched movies</h3>
<section id="topActors">
<section id="top0" class="actor-container">
<img class="actorImg">
<div class="actorNameDiv">
<h3 class="actorName"></h3>
</div>
<p class="actorCount"></p>
</section>
<section id="top1" class="actor-container">
<img class="actorImg">
<div class="actorNameDiv">
<h3 class="actorName"></h3>
</div>
<p class="actorCount"></p>
</section>
<section id="top2" class="actor-container">
<img class="actorImg">
<div class="actorNameDiv">
<h3 class="actorName"></h3>
</div>
<p class="actorCount"></p>
</section>
<section id="top3" class="actor-container">
<img class="actorImg">
<div class="actorNameDiv">
<h3 class="actorName"></h3>
</div>
<p class="actorCount"></p>
</section>
<section id="top4" class="actor-container">
<img class="actorImg">
<div class="actorNameDiv">
<h3 class="actorName"></h3>
</div>
<p class="actorCount"></p>
</section>
<section id="top5" class="actor-container">
<img class="actorImg">
<div class="actorNameDiv">
<h3 class="actorName"></h3>
</div>
<p class="actorCount"></p>
</section>
</section>
</div>
</section>
<section class="row">
<div class="column">
<h3 class="statTitle">MovieDB ratings of movies watched</h3>
<section id="ratingRow">
<div class="rating-container">
<div class="imdbRating">
<p class="largText">Lowest Score</p>
<img src="./images/star.png" height="12px">
<p id="lowScore" class="smallText"></p>
</div>
<img id="lowPoster" class="ratingPoster" src="">
<p id="lowTitle" class="largText"></p>
</div>
<div class="rating-container">
<div class="imdbRating">
<p class="largText">Highest Score</p>
<img src="./images/star.png" height="12px">
<p id="highScore" class="smallText"></p>
</div>
<img id="highPoster" class="ratingPoster" src="">
<p id="highTitle" class="largText"></p>
</div>
</section>
</div>
<div class="column">
<h3 class="statTitle">Genres contained in Movies Watched</h3>
<section class="stats-container genres-container">
<canvas id="genresChart" width="1380" height="800"></canvas>
</section>
</div>
</section>
<section class="row">
<div class="column">
<h3 class="statTitle">Watched movies from these production countries</h3>
<section class="stats-container">
<canvas id="country" width="50" heigth="50"></canvas>
</section>
</div>
<div class="column">
<h3 class="statTitle">Watched movies in these languages</h3>
<section class="stats-container lang-container">
<canvas id="lang" width="50" heigth="50"></canvas>
</section>
</div>
</section>
<section class="row">
</section>
</section>
</main>
</body>
<script>
getUserStats();
getWatchedForStats();
</script>
</html>