Only show image if exists
This commit is contained in:
parent
7d5ca83a36
commit
2e19245f39
3 changed files with 5 additions and 3 deletions
|
@ -11,7 +11,8 @@
|
|||
<ul>
|
||||
{{with .Books}}
|
||||
{{range .}}
|
||||
<li><a href="/book/{{.Title}}"><img src="{{.CoverSmall}}" alt="{{.Title}}" /><strong>{{.Title}}</strong></a> - {{range .Author}}{{.}}, {{end}}</li>
|
||||
<li><a href="/book/{{.Title}}">{{if .CoverSmall}}<img src="{{.CoverSmall}}" alt="{{.Title}}" />{{end}}
|
||||
<strong>{{.Title}}</strong></a> - {{range .Author}}{{.}}, {{end}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ul>
|
||||
|
|
Reference in a new issue