go-bouquins/templates/book.html
2017-08-01 15:38:23 +02:00

63 lines
2.1 KiB
HTML

{{ 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>
{{ .Title }}
</h1>
</div>
<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>
</div>
</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>
<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">{{ .Series.Name }}</a>
<span class="badge">{{ .Series.Idx }}</span>
</div>
<h2><span class="glyphicon glyphicon-globe"></span> Langue</h2>
<ul><li>{{/* .Lang.toUpperCase() */}}</li></ul>
<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>
</div>
<h2>Détails</h2>
<ul>
<li v-if="book.pubdate"><strong>Date de publication</strong> {{ .Pubdate }}</li>
<li v-if="book.publisher"><strong>Editeur</strong> {{ .Publisher }}</li>
</ul>
</div>
</div>
{{ template "footer.html" . }}