go-bouquins/templates/author.html

61 lines
1.9 KiB
HTML
Raw Permalink Normal View History

2017-07-30 16:09:27 +00:00
{{ template "header.html" . }}
2017-08-04 16:57:15 +00:00
<div class="container" id="author">
2017-08-06 18:25:20 +00:00
{{ if .ID }}
2019-09-12 17:09:52 +00:00
<div class="border-bottom mb-3">
2017-07-30 16:09:27 +00:00
<h1>
2019-09-12 17:09:52 +00:00
<i class="fas fa-user"></i>
2017-08-03 18:36:46 +00:00
{{ .Name }}
2017-07-30 16:09:27 +00:00
</h1>
</div>
<ul class="nav nav-pills">
2019-09-12 17:09:52 +00:00
<li role="presentation" class="nav-item"><a href="#" class="nav-link" :class="{ active: tab == 'books' }" @click="showBooks">Livres</a></li>
2017-08-04 16:57:15 +00:00
{{ if gt (len .Series) 0 }}
2019-09-12 17:09:52 +00:00
<li role="presentation" class="nav-item"><a href="#" class="nav-link" :class="{ active: tab == 'series' }" @click="showSeries">Series</a></li>
2017-08-04 16:57:15 +00:00
{{ end }}
{{ if gt (len .CoAuthors) 0 }}
2019-09-12 17:09:52 +00:00
<li role="presentation" class="nav-item"><a href="#" @click="showAuthors" class="nav-link" :class="{ active: tab == 'authors' }">Co-auteurs</a></li>
2017-08-04 16:57:15 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</ul>
2019-09-12 17:09:52 +00:00
<div class="card card-default" :hidden="tab != 'books'">
<div class="card-body">
2017-08-03 18:36:46 +00:00
{{ range .Books }}
<ul class="list-unstyled">
2019-09-12 17:09:52 +00:00
<li> <i class="fas fa-book"></i>
2017-08-06 18:25:20 +00:00
<a href="/books/{{ .ID }}">{{ .Title }}</a>
2017-07-30 16:09:27 +00:00
</li>
2017-07-30 13:39:20 +00:00
</ul>
2017-08-03 18:36:46 +00:00
{{ end }}
2017-07-30 13:39:20 +00:00
</div>
2017-07-30 16:09:27 +00:00
</div>
2017-08-04 16:57:15 +00:00
{{ if gt (len .Series) 0 }}
2019-09-12 17:09:52 +00:00
<div class="card card-default" :hidden="tab != 'series'">
<div class="card-body">
2017-08-04 16:57:15 +00:00
{{ range .Series }}
2017-08-03 18:36:46 +00:00
<ul class="list-unstyled">
2019-09-12 17:09:52 +00:00
<li><i class="fas fa-list"></i>
2017-08-06 18:25:20 +00:00
<a href="/series/{{ .ID }}">{{ .Name }}</a>
2017-07-30 16:09:27 +00:00
</li>
</ul>
2017-08-03 18:36:46 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
</div>
2017-08-04 16:57:15 +00:00
{{ end }}
{{ if gt (len .CoAuthors) 0 }}
2019-09-12 17:09:52 +00:00
<div class="card card-default" :class="tab != 'authors'">
<div class="card-body">
2017-08-04 16:57:15 +00:00
{{ range .CoAuthors }}
2017-08-03 18:36:46 +00:00
<ul class="list-unstyled">
2019-09-12 17:09:52 +00:00
<li><i class="fas fa-user"></i>
2017-08-06 18:25:20 +00:00
<a href="/authors/{{ .ID }}">{{ .Name }}</a>
2017-07-30 16:09:27 +00:00
</li>
</ul>
2017-08-03 18:36:46 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
</div>
2017-08-04 16:57:15 +00:00
{{ end }}
2017-08-03 18:36:46 +00:00
{{ else }}
<div class="alert alert-danger" role="alert">Aucun auteur sélectionné</div>
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
{{ template "footer.html" . }}