summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorraylu <raylu@mixpanel.com>2011-08-01 02:34:41 -0700
committerraylu <raylu@mixpanel.com>2011-08-01 02:34:41 -0700
commitf9803a3bbfb3e730213825d6dc332b7c31321330 (patch)
tree486553d015e100e87dd7f37daeaf65fea38a86fd /templates
parent5395b5ada15dfc417cbe789ea3297274f050892d (diff)
downloadaudioaxis-f9803a3bbfb3e730213825d6dc332b7c31321330.tar.xz
use new exp/template, make stuff work
Diffstat (limited to 'templates')
-rw-r--r--templates/p.html53
1 files changed, 46 insertions, 7 deletions
diff --git a/templates/p.html b/templates/p.html
index 14b367c..af095d1 100644
--- a/templates/p.html
+++ b/templates/p.html
@@ -1,8 +1,47 @@
-Playlist: {Id}
-<br />
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>Audio Axis</title>
+ <link href="/static/base.css" rel="stylesheet">
+</head>
-{.repeated section Songs}
- http://www.youtube.com/watch?v={Yid}
-{.alternates with}
- <br />
-{.end}
+<body>
+ <header>
+ <img src="/static/audioaxis-white.png" alt="Audio Axis">
+ </header>
+ <article>
+ {{range .Songs}}
+ <section class="song">
+ <div class="info">
+ <a href="http://www.youtube.com/watch?v={{.Yid}}">{{.Name}}</a>
+ {{.User}}
+ </div>
+ <div class="thumb">
+ <img src="http://i.ytimg.com/vi/{{.Yid}}/1.jpg" alt="{{.Name}}">
+ </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 current_id = '{{$first.Yid}}';
+ var ids = [{{range .Songs}}'{{.Yid}}',{{end}}];
+ </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>