Use & as author separator

And set properly the separators on other fields
This commit is contained in:
Las Zenow 2021-05-01 11:36:07 +00:00
parent 867c19f97c
commit 7665eae762
8 changed files with 61 additions and 13 deletions

View file

@ -44,9 +44,20 @@
</p>
<div class="card-text row">
<p class="col-md-8">
{{if .Authors}}<strong>Authors:</strong> {{range .Authors}}<a href="/search/?q=author:{{.}}">{{.}}</a>, {{end}}<br />{{end}}
{{if .Authors}}<strong>Authors:</strong>
{{range $i, $author := .Authors}}
{{if $i}}&amp;{{end}}
<a href="/search/?q=author:{{$author}}">{{$author}}</a>
{{end}}
<br />{{end}}
{{if .Publisher}}<strong>Publisher:</strong> <a href="/search/?q=publisher:{{.Publisher}}">{{.Publisher}}</a><br />{{end}}
{{if .Tags}}<strong>Tags:</strong> {{range .Tags}}<a href="/search/?q=tag:{{.}}">{{.}}</a>, {{end}}<br />{{end}}
{{if .Tags}}<strong>Tags:</strong>
{{range $i, $tag := .Tags}}
{{if $i}},{{end}}
<a href="/search/?q=tag:{{$tag}}">{{$tag}}</a>
{{end}}
<br />{{end}}
{{if .Isbn}}<strong>ISBN:</strong> {{.Isbn}}<br />{{end}}
{{if .Date}}<strong>Date:</strong> {{.Date}}<br />{{end}}
{{if .Lang}}<strong>Lang:</strong> <a href="/search/?q=lang:{{.Lang}}">{{.Lang}}</a> <br />{{end}}