-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
240 lines (208 loc) · 5.81 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Last.fm Track History</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
<meta itemprop="name" content="Last.fm Track History" />
<meta itemprop="description" content="Visualize up to 75k of your Last.fm scrobbles" />
<meta itemprop="image" content="https://lastfmviz.netlify.com/thumbnail.png" />
<meta property="og:title" content="Last.fm Track History" />
<meta property="og:site_name" content="Last.fm Track History" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Visualize up to 75k of your Last.fm scrobbles" />
<meta property="og:image" content="https://lastfmviz.netlify.com/thumbnail.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Last.fm Track History" />
<meta name="twitter:description" content="Visualize up to 75k of your Last.fm scrobbles" />
<meta name="twitter:image" content="https://lastfmviz.netlify.com/thumbnail.png" />
<meta name="twitter:image:alt" content="Visualize up to 75k of your Last.fm scrobbles" />
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-75784561-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-75784561-8');
</script>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:500,700&display=swap');
body {
margin: 0 0 0 0;
background: black;
color: white;
font-family: 'Roboto Mono';
}
canvas {
margin: 0 auto;
position: absolute;
right: 0;
left: 0;
top: 54px;
}
nav {
position: fixed;
top: 0;
width: calc(100% - 40px);
background: black;
padding: 20px 20px;
align-items: center;
z-index: 99;
transition: transform 0.2s ease-in-out 0.5s;
}
nav.hidden {
transform: translateY(-136px);
}
.input-username {
background: transparent;
color: white;
font-size: 32px;
font-family: 'Roboto Mono';
box-shadow: none;
width: 100%;
/* padding: 10px 0; */
margin-bottom: 20px;
}
input {
-webkit-appearance: none;
outline: none;
border: none;
}
.status {
margin-bottom: 10px;
/* width: 40%; */
/* text-align: right; */
font-size: 16px;
}
.status > a {
color: white;
}
::-webkit-scrollbar {
width: 11px;
}
::-webkit-scrollbar-track {
background: #494949;
border-radius: 0px;
}
::-webkit-scrollbar-thumb {
background: #000000;
border-radius: 0px;
}
#viz {
display: grid;
position: absolute;
width: 100%;
grid-template-columns: repeat(10, 1fr);
flex-wrap: wrap;
/* justify-content: center; */
margin-top: 136px;
padding-bottom: 72px;
}
#viz > img {
width: 100%;
height: 100%;
/* height: 64px; */
/* width: 4.31vw; */
}
#timestamp {
position: fixed;
left: 0;
background: black;
color: white;
padding: 20px 20px;
bottom: 0px;
text-align: left;
font-size: 24px;
width: 216px;
transform: translateX(-216px);
transition: transform 0.2s ease-in-out 0.5s;
}
#timestamp.visible {
transform: translateX(0);
}
/* footer {
padding: 10px;
font-size: 12px;
z-index: 100;
position: fixed;
top: 0;
text-align: right;
right: 0;
} */
.plug {
position: fixed;
bottom: 10px;
font-size: 14px;
right: 10px;
color: white;
z-index: 101;
}
@media (max-width: 768px) {
nav {
display: block;
padding: 20px;
}
nav.hidden {
transform: translateY(-133px);
}
#viz {
margin-top: 135px;
}
#viz > img {
/* height: 4vw; */
/* height: 48px; */
width: 100vw / 10
}
#status {
text-align: left;
width: 100%;
}
.input-username {
font-size: 16px;
margin-bottom: 20px;
}
#timestamp {
transform: translateY(61px);
font-size: 16px;
width: 100%;
}
#timestamp.visible {
transform: translateY(0);
}
.plug {
font-size: 8px;
}
}
@media (min-width: 1440px) {
#viz {
grid-template-columns: repeat(20, 1fr);
}
}
</style>
</head>
<body>
<nav>
<input id="input-username" class="input-username" placeholder="Type last.fm username & hit Enter" type="text" />
<div id="status" class="status">
Welcome.
<br />
<br />
I wanted to have the experience of looking back at old photos, but for music.
<br />
This visualizes up to 75k of your most recent Last.fm tracks.
<br />
I hope you enjoy.
</div>
</nav>
<canvas id="c"></canvas>
<div id="viz"></div>
<a class="plug" target="_blank" href="https://maxs.space">made by max</a>
<div id="timestamp">January 2020</div>
<script src="render.js"></script>
<script src="fetch.js"></script>
<script src="main.js"></script>
<script src="moment.min.js"></script>
</body>
</html>