bouquins-bchs/book.html
2017-01-01 17:05:27 +01:00

67 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<title>Livre</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="preload" href="js/book.min.js" as="script">
<link rel="preload" href="js/vue.min.js" as="script">
<link rel="prefetch" href="js/book.min.js">
<link rel="prefetch" href="js/vue.min.js">
</head>
<body>
<div class="container" id="app">
<div class="page-header" v-if="book.id">
<div class="row">
<div class="col-xs-12 col-md-9">
<h1>
<span class="glyphicon glyphicon-book"></span>
{{ book.title }}
</h1>
</div>
<div class="col-xs-12 col-md-3 text-right">
<template v-for="data in book.data">
<a v-bind: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">{{ author.name }}</li>
</ul>
<h2 v-if="book.series">
<span class="glyphicon glyphicon-list"></span> Serie
</h2>
<div v-if="book.series">
{{ book.series.name }}
<span class="badge">{{ book.series.idx }}</span>
</div>
<h2><span class="glyphicon glyphicon-globe"></span> Langue</h2>
<ul><li>{{ book.lang.toUpperCase() }}</li></ul>
<!-- TODO tags -->
<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>
<!-- TODO cover -->
</div>
<script src="js/vue.min.js"></script>
<script src="js/book.min.js"></script>
</body>
</html>