115 lines
4.7 KiB
HTML
115 lines
4.7 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/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">
|
|
<div class="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<h3>Recherche</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<form id="searchForm">
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" placeholder="Recherche" v-model="q">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Parmi</label><br/>
|
|
<label class="radio-inline">
|
|
<input type="radio" value="books" v-model="which"> livres
|
|
</label>
|
|
<label class="radio-inline">
|
|
<input type="radio" value="authors" v-model="which"> auteurs
|
|
</label>
|
|
<label class="radio-inline">
|
|
<input type="radio" value="series" v-model="which"> series
|
|
</label>
|
|
<label class="radio-inline">
|
|
<input type="radio" value="all" v-model="which"> tous
|
|
</label>
|
|
</div>
|
|
<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>
|
|
<div class="form-group">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" v-model="all" disabled> Tous les mots
|
|
</label>
|
|
<p class="help-block">Cocher pour rechercher les élements contenant tous les mots saisis</p>
|
|
</div>
|
|
</div>
|
|
<button type="button" class="btn btn-primary" @click="searchFull">Rechercher</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div v-if="books.length > 0">
|
|
<h2>{{ booksCount }} <template v-if="booksCount>1">livres</template><template v-else>livre</template></h2>
|
|
<ul>
|
|
<li v-for="book in books" class="list-unstyled">
|
|
<span class="glyphicon glyphicon-book"></span>
|
|
<a :href="'book.html?id='+book.id">{{ book.title }}</a>
|
|
</li>
|
|
<li v-if="books.length < booksCount" class="list-unstyled">...</li>
|
|
</ul>
|
|
</div>
|
|
<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>
|
|
<a :href="'author.html?id='+author.id">{{ author.name }}</a>
|
|
</li>
|
|
<li v-if="authors.length < authorsCount" class="list-unstyled">...</li>
|
|
</ul>
|
|
</div>
|
|
<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>
|
|
</div>
|
|
<script src="js/vue.min.js"></script>
|
|
<script src="js/search.min.js"></script>
|
|
</body>
|
|
</html>
|