go-bouquins/templates/book.html

76 lines
2.0 KiB
HTML
Raw Normal View History

2017-07-30 16:09:27 +00:00
{{ template "header.html" . }}
<div class="container" id="app">
2017-08-01 18:00:20 +00:00
{{ if .Id }}
<div class="page-header">
{{ if .Has_cover }}
<div class="row">
2017-07-30 16:09:27 +00:00
<img :src="bookCover(book)" alt="Pas de couverture" title="Couverture" class="img-responsive img-rounded"/>
</div>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
<div class="row">
<div class="col-xs-12 col-md-9">
<h1>
<span class="glyphicon glyphicon-book"></span>
2017-08-01 13:38:23 +00:00
{{ .Title }}
2017-07-30 16:09:27 +00:00
</h1>
2017-07-30 13:39:20 +00:00
</div>
2017-08-01 18:00:20 +00:00
{{ if gt (len .Data) 0 }}
2017-07-30 16:09:27 +00:00
<div class="col-xs-12 col-md-3 text-right">
2017-08-01 18:00:20 +00:00
{{ range .Data }}
2017-07-30 16:09:27 +00:00
<a :href="bookLink(book, data)" class="btn btn-success">
<span class="glyphicon glyphicon-download-alt"></span> Télécharger
2017-08-01 18:00:20 +00:00
{{ .Format }} ({{ .Size }})
2017-07-30 16:09:27 +00:00
</a>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-07-30 13:39:20 +00:00
</div>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
</div>
2017-08-01 18:00:20 +00:00
<div class="row">
2017-07-30 16:09:27 +00:00
<h2>
2017-08-01 18:00:20 +00:00
<span class="glyphicon glyphicon-user"></span> Auteur{{ if gt (len .Authors) 1 }}s{{ end }}
2017-07-30 16:09:27 +00:00
</h2>
<ul>
2017-08-01 18:00:20 +00:00
{{ range .Authors }}
<li>
<a href="/authors/{{.Id}}">{{ .Name }}</a>
2017-07-30 16:09:27 +00:00
</li>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</ul>
2017-07-30 13:39:20 +00:00
2017-08-01 18:00:20 +00:00
{{ if .Series }}
<h2>
2017-07-30 16:09:27 +00:00
<span class="glyphicon glyphicon-list"></span> Serie
</h2>
2017-08-01 18:00:20 +00:00
<div>
<a href="/series/{{ .Series.Id }}">{{ .Series.Name }}</a>
<span class="badge">{{ .SeriesIndex }}</span>
2017-07-30 16:09:27 +00:00
</div>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
<h2><span class="glyphicon glyphicon-globe"></span> Langue</h2>
2017-08-01 18:00:20 +00:00
<ul><li>{{ .Lang }}</li></ul>
2017-07-30 13:39:20 +00:00
2017-08-01 18:00:20 +00:00
{{ if gt (len .Tags) 0 }}
<h2>
2017-07-30 16:09:27 +00:00
<span class="glyphicon glyphicon-tags"></span> Tags
</h2>
<div v-if="book.tags">
2017-08-01 18:00:20 +00:00
{{ range .Tags }}
<span class="label label-info">{{ . }}</span>&nbsp;
{{ end }}
2017-07-30 13:39:20 +00:00
</div>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
<h2>Détails</h2>
<ul>
2017-08-01 13:38:23 +00:00
<li v-if="book.pubdate"><strong>Date de publication</strong> {{ .Pubdate }}</li>
<li v-if="book.publisher"><strong>Editeur</strong> {{ .Publisher }}</li>
2017-07-30 16:09:27 +00:00
</ul>
</div>
2017-08-01 18:00:20 +00:00
{{ else }}
<div class="alert alert-danger" role="alert">Aucun livre sélectionné</div>
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
{{ template "footer.html" . }}