book.html 1.09 KiB
{{template "_head.html" .}}
<div class="row">
<div class="col-xs-6">
{{ if .Book.CoverPath }}
<img src="/book/cover/{{.Book.Id}}">
{{end}}
</div>
<div class="col-xs-6">
<h1>
{{.Book.Metadata.Title}}
</h1>
<p class="book-authors"><b>
{{join .Book.Metadata.Creator ", "}}
</b></p>
<p>
{{join .Book.Metadata.Publisher ", "}}
- {{.Book.Metadata.Date}}
</p>
{{if .Book.Metadata.Format}}
<p>
{{join .Book.Metadata.Format " / "}}
</p>
{{end}}
{{if .Description}}
<p>{{.Description}}</p>
{{end}}
{{range $i, $f := .Files}}
<p>
<a class="btn btn-large btn-primary" href="/dl/{{$f.Id}}/{{$i}}">
<span class="glyphicon glyphicon-download"></span>
Download ({{$f.FileType}})
</a>
</p>
{{end}}
{{if .HasEpub}}
<p>
<a class="btn btn-large btn-primary"
href="/read/{{.Book.Id}}/{{.EpubIndex}}">
<span class="glyphicon glyphicon-book"></span>
Read Online
</a>
</p>
{{end}}
</div>
</div>
{{template "_footer.html" .}}