-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
104 lines (90 loc) · 2.53 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
<html>
<head>
<title>Lastest track Last.fm</title>
<meta name="description" content="">
<meta name="author" content="">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<!-- Le styles -->
<style>
body {
padding: 20px;
font-family: Arial, sans-serif;
font-size: 13px;
}
p {
color: #ccc;
float: left;
width: 300px;
margin-left: 20px;
}
/* =================== */
/* LATEST TRACK STYLES */
#latest_track {
/*
The width of the image returned in the script
is 300x300, but there are larger alternatives.
Width and height should have equal values.
*/
max-width: 300px; /* @editable */
max-height: 300px; /* @editable */
position: relative;
float: left;
width: 100%;
height: 100%;
}
#latest_track img {
width: 100%;
position: absolute;
left: 0;
top: 0;
}
#latest_track a {
/*
Adjust font styles
*/
font-size: 19px; /* @editable */
font-family: Arial, sans-serif; /* @editable */
top: 20px; /* @editable */
color: #FFF; /* @editable */
padding: 0 20px; /* @editable */
text-decoration: none; /* @editable */
text-align: left; /* @editable */
position: absolute;
display: block;
}
#latest_track .timeago {
/*
Adjust timestamp styles
*/
font-size: 10px; /* @editable */
font-style: italic; /* @editable */
color: #fff; /* @editable */
margin-top: 5px; /* @editable */
display: block;
}
#latest_track .artist {
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div id="latest_track"></div>
<p>Keep in mind this feed is being scobbled from Spotify via Last.fm, not all tracks have album covers - in which case you may see a dummy cover.</p>
</div>
<script src="//code.jquery.com/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.0.0/moment.min.js"></script>
<script src="lastfm-parser.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4714937-19']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>