mirror of
https://github.com/alrayyes/lastfm-hugo-demo-theme
synced 2023-11-13 18:16:42 +00:00
Workaround for Hugo range bug
This commit is contained in:
parent
1355304e6d
commit
39a4713a7d
@ -32,7 +32,7 @@
|
|||||||
{{ range $dataJ.recenttracks.track }}
|
{{ range $dataJ.recenttracks.track }}
|
||||||
<a href="{{ .url }}" target="_new">
|
<a href="{{ .url }}" target="_new">
|
||||||
|
|
||||||
<div class="cover-card col-sm-4" style="background: url({{ range last 1 .image }}{{ if index . "#text" }}{{ index . "#text" }}{{ else }}http://img2-ak.lst.fm/i/u/300x300/c6f59c1e5e7240a4c0d427abd71f3dbb.png{{ end }}{{ end }}) no-repeat center top;background-size:cover;">
|
{{ range last 1 .image }}<div class="cover-card col-sm-4" style="background: url({{ if index . "#text" }}{{ index . "#text" }}{{ else }}http://img2-ak.lst.fm/i/u/300x300/c6f59c1e5e7240a4c0d427abd71f3dbb.png{{ end }}) no-repeat center top;background-size:cover;">{{ end }}
|
||||||
<p>
|
<p>
|
||||||
{{ printf "%s - %s" (index .artist "#text") .name }}<br>
|
{{ printf "%s - %s" (index .artist "#text") .name }}<br>
|
||||||
-<br>
|
-<br>
|
||||||
|
Loading…
Reference in New Issue
Block a user