go-bouquins/templates/book.html

63 lines
2.1 KiB
HTML
Raw Normal View History

2017-07-30 16:09:27 +00:00
{{ template "header.html" . }}
<div class="container" id="app">
<div class="page-header" v-if="book.id">
<div class="row" v-if="book.has_cover">
<img :src="bookCover(book)" alt="Pas de couverture" title="Couverture" class="img-responsive img-rounded"/>
</div>
<div class="row">
<div class="col-xs-12 col-md-9">
<h1>
<span class="glyphicon glyphicon-book"></span>
{{ .Book.Title }}
</h1>
2017-07-30 13:39:20 +00:00
</div>
2017-07-30 16:09:27 +00:00
<div class="col-xs-12 col-md-3 text-right">
<template v-for="data in book.data">
<a :href="bookLink(book, data)" class="btn btn-success">
<span class="glyphicon glyphicon-download-alt"></span> Télécharger
{{ .Data.Format }} ({{/* .FormatBytes(data.size) */}})
</a>
</template>
2017-07-30 13:39:20 +00:00
</div>
2017-07-30 16:09:27 +00:00
</div>
</div>
<div class="alert alert-danger" role="alert" v-else>Aucun livre sélectionné</div>
<div class="row" v-if="book.id">
<h2>
<span class="glyphicon glyphicon-user"></span> Auteur{{/* .Book.Authors.Length > 1 ? 's' : '' */}}
</h2>
<ul>
<li v-for="author in book.authors">
<a :href="'author.html?id='+author.id">{{ .Author.Name }}</a>
</li>
</ul>
2017-07-30 13:39:20 +00:00
2017-07-30 16:09:27 +00:00
<h2 v-if="book.series">
<span class="glyphicon glyphicon-list"></span> Serie
</h2>
<div v-if="book.series">
<a :href="'series.html?id='+book.series.id">{{ .Book.Series.Name }}</a>
<span class="badge">{{ .Book.Series.Idx }}</span>
</div>
<h2><span class="glyphicon glyphicon-globe"></span> Langue</h2>
<ul><li>{{/* .Book.Lang.toUpperCase() */}}</li></ul>
2017-07-30 13:39:20 +00:00
2017-07-30 16:09:27 +00:00
<h2 v-if="book.tags">
<span class="glyphicon glyphicon-tags"></span> Tags
</h2>
<div v-if="book.tags">
<template v-for="tag in book.tags">
<span class="label label-info">{{ .Tag }}</span>&nbsp;
</template>
2017-07-30 13:39:20 +00:00
</div>
2017-07-30 16:09:27 +00:00
<h2>Détails</h2>
<ul>
<li v-if="book.pubdate"><strong>Date de publication</strong> {{ .Book.Pubdate }}</li>
<li v-if="book.publisher"><strong>Editeur</strong> {{ .Book.Publisher }}</li>
</ul>
</div>
</div>
{{ template "footer.html" . }}