2017-01-14 16:38:40 +00:00
|
|
|
<!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/search.min.js" as="script">
|
|
|
|
<link rel="preload" href="js/vue.min.js" as="script">
|
|
|
|
<link rel="prefetch" href="js/search.min.js">
|
|
|
|
<link rel="prefetch" href="js/vue.min.js">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<nav class="navbar navbar-inverse" id="nav">
|
|
|
|
<div class="container">
|
|
|
|
<ul class="nav navbar-nav">
|
|
|
|
<li><a href="index.html">Accueil</a></li>
|
|
|
|
<li class="active"><a href="search.html">Recherche</a></li>
|
|
|
|
<li><a href="#">A propos</a></li>
|
|
|
|
</ul>
|
|
|
|
<form class="navbar-form navbar-right" role="search" method="get" action="search.html">
|
|
|
|
<div class="form-group">
|
|
|
|
<input name="q" type="text" class="form-control" placeholder="Recherche">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<div class="container" id="app">
|
2017-01-14 17:48:08 +00:00
|
|
|
<div class="panel panel-primary">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3>Recherche</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2017-01-15 15:12:04 +00:00
|
|
|
<form id="searchForm" @submit="searchFull" v-on:submit.prevent="onSubmit">
|
2017-01-14 17:48:08 +00:00
|
|
|
<div class="form-group">
|
2017-01-15 14:25:49 +00:00
|
|
|
<input type="text" class="form-control" placeholder="Recherche" v-model="q">
|
2017-01-14 17:48:08 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Parmi</label><br/>
|
|
|
|
<label class="radio-inline">
|
2017-01-15 14:25:49 +00:00
|
|
|
<input type="radio" value="books" v-model="which"> livres
|
2017-01-14 17:48:08 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
2017-01-15 15:00:05 +00:00
|
|
|
<input type="radio" value="authors" v-model="which"> auteurs
|
2017-01-14 17:48:08 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
2017-01-15 14:25:49 +00:00
|
|
|
<input type="radio" value="series" v-model="which"> series
|
2017-01-14 17:48:08 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
2017-01-15 14:25:49 +00:00
|
|
|
<input type="radio" value="all" v-model="which"> tous
|
2017-01-14 17:48:08 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2017-01-15 15:00:05 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label>Nombre de resultats</label><br/>
|
|
|
|
<label class="radio-inline">
|
|
|
|
<input type="radio" value="10" v-model="perpage"> 10
|
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
|
|
|
<input type="radio" value="20" v-model="perpage"> 20
|
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
|
|
|
<input type="radio" value="50" v-model="perpage"> 50
|
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
|
|
|
<input type="radio" value="100" v-model="perpage"> 100
|
|
|
|
</label>
|
|
|
|
</div>
|
2017-01-14 17:48:08 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
2017-01-15 14:25:49 +00:00
|
|
|
<input type="checkbox" v-model="all" disabled> Tous les mots
|
2017-01-14 17:48:08 +00:00
|
|
|
</label>
|
|
|
|
<p class="help-block">Cocher pour rechercher les élements contenant tous les mots saisis</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-15 15:12:04 +00:00
|
|
|
<button type="submit" class="btn btn-primary">Rechercher</button>
|
2017-01-14 17:48:08 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
2017-01-14 16:38:40 +00:00
|
|
|
</div>
|
|
|
|
<div v-if="books.length > 0">
|
2017-01-14 16:52:52 +00:00
|
|
|
<h2>{{ booksCount }} <template v-if="booksCount>1">livres</template><template v-else>livre</template></h2>
|
2017-01-14 16:38:40 +00:00
|
|
|
<ul>
|
2017-01-14 17:48:08 +00:00
|
|
|
<li v-for="book in books" class="list-unstyled">
|
2017-01-14 16:38:40 +00:00
|
|
|
<span class="glyphicon glyphicon-book"></span>
|
|
|
|
<a :href="'book.html?id='+book.id">{{ book.title }}</a>
|
|
|
|
</li>
|
2017-01-14 17:48:08 +00:00
|
|
|
<li v-if="books.length < booksCount" class="list-unstyled">...</li>
|
2017-01-14 16:38:40 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2017-01-15 15:00:05 +00:00
|
|
|
<div v-if="authors.length > 0">
|
|
|
|
<h2>{{ authorsCount }} <template v-if="authorsCount>1">auteurs</template><template v-else>auteur</template></h2>
|
|
|
|
<ul>
|
|
|
|
<li v-for="author in authors" class="list-unstyled">
|
|
|
|
<span class="glyphicon glyphicon-user"></span>
|
2017-01-15 15:01:37 +00:00
|
|
|
<a :href="'author.html?id='+author.id">{{ author.name }}</a>
|
2017-01-15 15:00:05 +00:00
|
|
|
</li>
|
|
|
|
<li v-if="authors.length < authorsCount" class="list-unstyled">...</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-01-15 14:25:49 +00:00
|
|
|
<div v-if="series.length > 0">
|
|
|
|
<h2>{{ seriesCount }} <template v-if="seriesCount>1">series</template><template v-else>serie</template></h2>
|
|
|
|
<ul>
|
|
|
|
<li v-for="serie in series" class="list-unstyled">
|
|
|
|
<span class="glyphicon glyphicon-list"></span>
|
|
|
|
<a :href="'series.html?id='+serie.id">{{ serie.name }}</a>
|
|
|
|
</li>
|
|
|
|
<li v-if="series.length < seriesCount" class="list-unstyled">...</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-01-14 16:38:40 +00:00
|
|
|
</div>
|
|
|
|
<script src="js/vue.min.js"></script>
|
|
|
|
<script src="js/search.min.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|