summaryrefslogtreecommitdiffstats
path: root/templates/p.html
blob: b59537722813e0b4c13985316cbac7a0959abd68 (plain)
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
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Audio Axis</title>
	<link href='http://fonts.googleapis.com/css?family=Cantarell' rel='stylesheet'>
	<link href="/static/base.css" rel="stylesheet">
</head>

<body>
	<header>
		<img src="/static/audioaxis-white.png" alt="Audio Axis" class="aa">
		<form onsubmit="return search(this.song.value)">
			<label for="user">Username:</label>
			<input type="text" id="user" value="anonymous" size="16">
			<br>
			<label for="song">Add a song:</label>
			<input type="text" id="song" autocomplete="off">
			<input type="submit" value="Search">
		</form>
		<div id="results" onblur="$(this).slideUp()"><ul>
		</ul></div>
	</header>
	<article>
		{{range .Songs}}
			<section class="song">
				<div class="info">
					<a href="http://www.youtube.com/watch?v={{.Yid}}">{{.Title}}</a>
				</div>
				<div class="user">
					{{.User}}
				</div>
				<div class="remove" onclick="remove('{{.Yid}}')">×</div>
				<br class="clear">
				<div class="thumb">
					<img src="http://i.ytimg.com/vi/{{.Yid}}/1.jpg" alt="{{.Yid}}">
				</div>
				<canvas id="{{.Yid}}" width="700" height="20"></canvas>
				<br>
				<img src="/static/player_play.png" alt="Play" onclick="play('{{.Yid}}')" id="play_{{.Yid}}">
				<img src="/static/player_pause.png" alt="Pause" onclick="pause('{{.Yid}}')" id="pause_{{.Yid}}">
				<img src="/static/player_stop.png" alt="Stop" onclick="stop('{{.Yid}}')">
				<br class="clear">
			</section>
		{{else}}
			No songs found
		{{end}}
	</article>
	{{$first := index .Songs 0}}
	<script>
		var pid = '{{.Id}}';
		var current_id = '{{$first.Yid}}';
		var ids = [{{range .Songs}}'{{.Yid}}',{{end}}];
	</script>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
	<script src="/static/script.js"></script>
	<object data="http://www.youtube.com/v/{{$first.Yid}}?version=3&amp;enablejsapi=1" id="player" width="1" height="1" type="application/x-shockwave-flash">
		<param name="movie" value="http://www.youtube.com/v/{{$first.Yid}}?version=3&amp;enablejsapi=1">
		<param name="allowScriptAccess" value="always">
		<embed src="http://www.youtube.com/v/{{$first.Yid}}?version=3&amp;enablejsapi=1" allowScriptAccess="always">
	</object>
</body>

</html>