/root/_playlist.html
http://github.com/motemen/Teto · HTML · 16 lines · 13 code · 3 blank · 0 comment · 0 complexity · 529cb4d94cc8dda706d96d5aad1fa4aa MD5 · raw file
- % my $playlist = $_[0]{playlist};
- % my $control = $_[0]{control};
- <h1><% if ($playlist->image) { %><img src="<%= $playlist->image %>"> <% } %><a href="<%= $playlist->url %>" class="title"><%= $playlist->title || $playlist->url %></a> <a href="<%= $playlist->url %>" class="url"><%= eval { $playlist->url->host . $playlist->url->path_query } || '' %></a>
- <button onclick="$.post('/api/play', { playlist: '<%= $playlist->url %>' }).success(function () { location.reload() })">Play</button>
- </h1>
- <div class="playlist">
- <ol>
- % for (0 .. $#{ $playlist->tracks }) {
- % my $track = $playlist->tracks->[$_];
- %= $_mt->render_file('_track.html', $track, $_, $control);
- % }
- </ol>
- </div>