go-bouquins/templates/index.html
2017-07-31 20:14:38 +02:00

39 lines
1.7 KiB
HTML

{{ template "header.html" . }}
<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="showBooks">Livres</button>
<button class="btn btn-primary" type="button" @click="showAuthors">Auteurs</button>
<button class="btn btn-primary" type="button" @click="showSeries">Series</button>
</div>
<div class="table-responsive">
{{ if (ne (len .Books) 0) or (ne (len .Authors) 0) or (ne (len .Series) 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>
{{ end }}
{{ if ne (len .Series) 0 }}
{{ template "index_series.html" .Series }}
{{ end }}
{{ if ne (len .Authors) 0 }}
{{ template "index_authors.html" .Authors }}
{{ end }}
{{ if ne (len .Books) 0 }}
{{ template "index_books.html" .Books }}
{{ end }}
{{ if (ne (len .Books) 0) or (ne (len .Authors) 0) or (ne (len .Series) 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>
{{ end }}
</div>
</div>
{{ template "footer.html" . }}