From 5b46a7e44249c5f45e24c49b8bbd0af8d566c674 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 1 Dec 2018 21:44:23 +0000 Subject: [PATCH] Simplify spotify rendering and add preview link --- layouts/_default/spotify.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/layouts/_default/spotify.html b/layouts/_default/spotify.html index a5cb69e..e7adce8 100644 --- a/layouts/_default/spotify.html +++ b/layouts/_default/spotify.html @@ -18,6 +18,7 @@ + @@ -27,11 +28,19 @@ {{ range sort $playlist.tracks.items "track.name" }} {{ with .track }} + {{ $spotify_url := .external_urls.spotify }} - {{ with index (last 1 .album.images) 0 }} - + {{ with index .album.images 0 }} + {{ end }} - + +
Track Artist
+
+
{{ .name }} + {{ if .preview_url }} + + {{ end }} + {{ .name }} {{ range $i, $e := .artists }}{{ if $i }}, {{ end }}{{ .name }}{{ end }}