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

54 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<title>Bouquins</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/index.min.js" as="script">
<link rel="preload" href="js/vue.min.js" as="script">
<link rel="prefetch" href="js/index.min.js">
<link rel="prefetch" href="js/vue.min.js">
</head>
<body>
<div class="container" id="app">
<div class="jumbotron">
<h1>Bouquins</h1>
<p>Cette bibliothèque contient actuellement <strong>{{ booksCount }}</strong> livres et BD en format papier ou électronique.</p>
<button class="btn btn-primary" type="button" @click="loadBooks">Livres</button>
</div>
<div class="table-responsive" v-if="books.length > 0">
<nav aria-label="Pages">
<ul class="pager">
<li class="previous" v-bind:class="{ disabled: page <= 1 }"><a href="#" @click="prevPage"><span aria-hidden="true">&larr;</span> Précédents</a></li>
<li class="next"><a href="#" @click="nextPage">Suivants <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<table class="table table-striped">
<tr>
<th>Titre</th>
<th>Auteur(s)</th>
<th>Serie</th>
</tr>
<tr v-for="book in books">
<td><span class="glyphicon glyphicon-book"></span><a :href="'book.html?id='+book.id">{{ book.title }}</a></td>
<td>
<template v-for="author in book.authors">
<span class="glyphicon glyphicon-user"></span>{{ author.name }}
</template>
</td>
<td>
<template v-if="book.series">
<span class="glyphicon glyphicon-list"></span>{{ book.series ? book.series.name : '' }}
<span class="badge">{{ book.series ? book.series.idx : '' }}</span>
</template>
</td>
</tr>
</table>
</div>
</div>
<script src="js/vue.min.js"></script>
<script src="js/index.min.js"></script>
</body>
</html>