This repository has been archived on 2025-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
trantor/templates/index.html
Las Zenow 6a3da59c75 Port the web to bootstrap5
So it is responsive in phones.
2021-05-01 11:08:35 +00:00

43 lines
1.1 KiB
HTML

{{template "header.html" .S}}
{{range .News}}
<div class="row justify-content-center">
<div class="col-sm-10 alert alert-info">
<a href="/news/"><strong>News!</strong></a> {{.Text}}
</div>
</div>
{{end}}
<div class="row">
<p class="text-center">There are {{.Count}} books on the library.</p>
</div>
<div class="row">
<div class="col">
<h4>Last books added:</h4>
</div>
<div class="col text-end title">
<small>(<a href="/search/?q=">more</a>)</small>
<a href="/search/?fmt=rss&q="><img src="/img/feed.png"/></a>
</div>
</div>
<div class="row">
{{with .Books}}
{{range .}}
<div class="col-sm-2">
<div class="thumbnail text-center" style="border:none;">
<a href="/book/{{.ID}}" title="{{.Description}}">
{{if .Cover}}<div class="down"><img class="rounded" src="/cover/{{.ID}}/small/{{.Title}}.jpg" alt="{{.Title}}" /></div>{{end}}
<p><strong>{{.Title}}</strong></p>
</a>
</div>
</div>
{{end}}
{{end}}
</div>
<div class="row">
<p class="text-center">{{range .Tags}}<a class="badge bg-secondary" href="/search/?q=tag:{{.}}">{{.}}</a> {{end}}</p>
</div>
{{template "footer.html" .S}}