go-bouquins/templates/book.html

78 lines
2.2 KiB
HTML
Raw Normal View History

2017-07-30 16:09:27 +00:00
{{ template "header.html" . }}
<div class="container" id="app">
2017-08-06 18:25:20 +00:00
{{ if .ID }}
2019-09-12 17:09:52 +00:00
<div class="border-bottom mb-3">
2017-08-06 18:25:20 +00:00
{{ if .HasCover }}
2017-08-01 18:00:20 +00:00
<div class="row">
2017-09-05 14:29:34 +00:00
<a href="#bookinfo">
2019-09-12 17:09:52 +00:00
<img src="{{ bookCover .BookFull }}" alt="Pas de couverture" title="Couverture" class="img-fluid rounded" width="400px"/>
2017-09-05 14:29:34 +00:00
</a>
2017-07-30 16:09:27 +00:00
</div>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-09-05 14:29:34 +00:00
<div class="row" id="bookinfo">
2019-09-12 17:09:52 +00:00
<div class="col-xs-12 col-md-8">
<h1> <i class="fas fa-book"></i> {{ .Title }} </h1>
2017-07-30 13:39:20 +00:00
</div>
2017-08-01 18:00:20 +00:00
{{ if gt (len .Data) 0 }}
2019-09-12 17:09:52 +00:00
<div class="col-xs-12 col-md-4 text-right">
2017-08-04 17:47:15 +00:00
{{ $book := .BookFull }}
2017-08-01 18:00:20 +00:00
{{ range .Data }}
2017-08-04 17:47:15 +00:00
<a href="{{ bookLink . $book }}" class="btn btn-success">
2019-09-12 17:09:52 +00:00
<i class="fas fa-download"></i> Télécharger
2017-08-04 17:47:15 +00:00
{{ .Format }} ({{ humanSize .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">
2019-09-12 17:09:52 +00:00
<div class="col">
<h2>
<i class="fas fa-user"></i> Auteur{{ if gt (len .Authors) 1 }}s{{ end }}
</h2>
<ul class="mb-2">
{{ range .Authors }}
<li>
<a href="/authors/{{.ID}}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
2017-07-30 13:39:20 +00:00
2019-09-12 17:09:52 +00:00
{{ if .Series }}
<h2>
<i class="fas fa-list"></i> Serie
</h2>
<div class="mb-2 ml-4">
<a href="/series/{{ .Series.ID }}">{{ .Series.Name }}</a>
<span class="badge badge-pill badge-secondary">{{ .SeriesIndex }}</span>
</div>
{{ end }}
<h2> <i class="fas fa-language"></i> Langue</h2>
<ul><li>{{ .Lang }}</li></ul>
2017-07-30 13:39:20 +00:00
2019-09-12 17:09:52 +00:00
{{ if gt (len .Tags) 0 }}
<h2>
<i class="fas fa-tags"></i> Tags
</h2>
<div v-if="book.tags" class="mb-2 ml-4">
{{ range .Tags }}
<span class="badge badge-info">{{ . }}</span>&nbsp;
{{ end }}
</div>
2017-08-01 18:00:20 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
2019-09-12 17:09:52 +00:00
<h2><i class="fas fa-info-circle"></i> Détails</h2>
<ul class="mb-2">
<li v-if="book.pubdate"><strong>Date de publication</strong> {{ .Pubdate }}</li>
<li v-if="book.publisher"><strong>Editeur</strong> {{ .Publisher }}</li>
</ul>
</div>
2017-07-30 16:09:27 +00:00
</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" . }}