-
Notifications
You must be signed in to change notification settings - Fork 5
/
playlist.tpl
53 lines (45 loc) · 1.28 KB
/
playlist.tpl
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="static/normalize.css">
<link rel="stylesheet" href="static/stylish_ordered_list.css">
<script type="text/javascript">
function load() {
var urllocation = location.href;
if(urllocation.indexOf("#playing") > -1){
window.location.hash="anchor";
} else {
return false;
}
}
function click_item(type , no) {
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", '/' + type + '/' + no, true);
xmlHttp.send( null );
}
</script>
</head>
<body onload='location.href="#playing"'>
<ol class="betterList">
%i = 1
%for item in playlist_items:
<li
%if i == int(cur_track):
id='playing'
%end
>
<a href="#" onclick="click_item('track',{{i}}); return false;" ><span></span>
<div style="break: none; position: relative; top: -8px; font-size: 11pt; overflow: hidden; white-space: nowrap;">{{item['title']}}</div>
%if 'artist' in item:
<p style="font-size: 10pt; position: absolute; top: 8pt;">{{item['artist']}}</p>
%end
</a>
</li>
%i = i + 1
%end
</ol>
<script type="text/javascript">
location.href="#playing"
</script>
</body>
</html>