diff options
Diffstat (limited to 'templates/p.html')
-rw-r--r-- | templates/p.html | 53 |
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&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&enablejsapi=1"> + <param name="allowScriptAccess" value="always"> + <embed src="http://www.youtube.com/v/{{$first.Yid}}?version=3&enablejsapi=1" allowScriptAccess="always"> + </object> +</body> + +</html> |