2017-10-15 15:25:54 +01:00
|
|
|
{{ $ident := .Get 0 }}
|
|
|
|
|
|
|
|
{{ $playlist := getJSON "http://spotify-public-proxy.theorangeone.net/playlist/" $ident }}
|
|
|
|
|
|
|
|
<div class="playlist">
|
|
|
|
<a href="{{ $playlist.url }}">
|
|
|
|
<h3>
|
|
|
|
{{ $playlist.name }}
|
|
|
|
</h3>
|
|
|
|
</a>
|
|
|
|
|
2017-11-10 21:42:17 +00:00
|
|
|
<table class="table table-hover table-striped">
|
|
|
|
<caption><a href="{{ $playlist.url }}">View playlist on Spotify</a></caption>
|
2017-10-15 15:25:54 +01:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-11-10 21:42:17 +00:00
|
|
|
<th scope="row"></th>
|
|
|
|
<th scope="row">Track</th>
|
|
|
|
<th scope="row">Artist</th>
|
|
|
|
<th scope="row">Album</th>
|
2017-10-15 15:25:54 +01:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ range sort $playlist.tracks "name" }}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<span>
|
|
|
|
<a class="icon" href="{{ .preview_url }}"><i class="fa fa-play"></i></a>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td><a href="{{ .url }}">{{ .name }}</a></td>
|
|
|
|
<td>
|
|
|
|
{{ range $i, $e := .artists }}{{ if $i }}, {{ end }}{{ .name }}{{ end }}
|
|
|
|
</td>
|
|
|
|
<td>{{ .album.name }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|