-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (87 loc) · 4.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
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>lasttime</title>
<link href="https://fonts.googleapis.com/css?family=Varela+Round|Roboto:700,300" rel="stylesheet">
<link rel='shortcut icon' type='image/png' href='favicon.png' />
<!-- Bootstrap -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<div class="container">
<div id="header" class="d-flex align-items-end justify-content-between flex-wrap">
<h1>last<span>time</span></h1>
<div>basic time statistics for last.fm</div>
</div>
<form id="run-form" class="needs-validation collapse show" novalidate>
<div class="row mb-3">
<div class="col">
How it works:<br>
1. Loads all your scrobbling data from Start Date. (Use your own API key because I'm lazy.)<br>
2. Retrieves all track data from MusicBrainz, otherwise last.fm if data not found.<br>
3. Collates all the data.<br>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="api-key-input">last.fm API Key</label>
<input type="text" class="form-control" id="api-key-input" required>
<div class="invalid-feedback">
Please input an API key. (Make one <a href="https://www.last.fm/api/account/create">here</a>.)
</div>
</div>
<div class="form-group">
<label for="username-input">last.fm Username</label>
<input type="text" class="form-control" id="username-input" required>
<div class="invalid-feedback">
Please enter your username!
</div>
</div>
<div class="form-group">
<label for="date-from-input">Start Date</label>
<input type="text" class="form-control" id="date-from-input" value="01 January, 2018" placeholder="01 January, 2018">
</div>
</div>
</div>
<button type="submit" class="btn btn-primary" id="run-btn">Run</button>
</form>
<div class="progress collapse">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div id="progress-info" class="collapse">Loading scrobbles...</div>
<button id="progress-update" class="btn btn-primary collapse" type="button">Show data now!</button>
</div>
<div class="container collapse" id="statistics">
<div id="minutes-listened-card" class="card mb-3">
<div class="card-body">
<h5 class="card-title">minutes listened</h5>
<h1 id="minutes-listened" class="display-1">25,353</h1>
<h4 class="display-4"><span class="text-muted">or</span><br/><span id="hours-listened">425</span> hours</h4>
</div>
</div>
<div id="top-artists" class="card mb-3">
<div class="card-body">
<h5 class="card-title">top artists</h5>
<div class="top-list">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<a href="https://github.com/undefinist/lasttime" target="_blank">source</a>
<a href="https://twitter.com/undefinist" target="_blank">@undefinist</a>
</div>
</footer>
<script src="lasttime.js"></script>
</body>
</html>