go-bouquins/templates/index.html

39 lines
1.7 KiB
HTML
Raw Normal View History

2017-07-30 16:09:27 +00:00
{{ 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>
2017-07-30 13:39:20 +00:00
</nav>
2017-07-30 16:09:27 +00:00
{{ end }}
2017-07-31 18:14:38 +00:00
{{ if ne (len .Series) 0 }}
{{ template "index_series.html" .Series }}
2017-07-30 16:09:27 +00:00
{{ end }}
2017-07-31 18:14:38 +00:00
{{ if ne (len .Authors) 0 }}
{{ template "index_authors.html" .Authors }}
2017-07-30 16:09:27 +00:00
{{ end }}
2017-07-30 18:14:20 +00:00
{{ if ne (len .Books) 0 }}
2017-07-31 18:14:38 +00:00
{{ template "index_books.html" .Books }}
2017-07-30 16:09:27 +00:00
{{ 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" . }}