1
goldsmith-samples/bootstrap/layouts/collection.html

54 lines
1.5 KiB
HTML

{{define "collection"}}
{{template "header" .}}
{{template "navbar" .}}
<div class="container">
{{range .Meta.Pager.PageCurr.Items}}
<div>
<h1><a href="{{.Path}}">{{.Meta.Title}}</a></h1>
<p>
{{.Meta.Summary.Intro}}
<a href="{{.Path}}">[&hellip;more]</a>
</p>
</div>
{{end}}
{{if .Meta.Pager.Paged}}
<ul class="pagination justify-content-center">
{{if .Meta.Pager.PageCurr.Prev}}
<li class="page-item">
<a class="page-link" href="{{.Meta.Pager.PageCurr.Prev.File.Path}}" tabindex="-1">Previous</a>
</li>
{{else}}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Previous</a>
</li>
{{end}}
{{range .Meta.Pager.PagesAll}}
{{if eq $.Meta.Pager.PageCurr.Index .Index}}
<li class="page-item disabled">
<a class="page-link" href="#">{{.Index}}</a>
</li>
{{else}}
<li class="page-item">
<a class="page-link" href="{{.File.Path}}">{{.Index}}</a>
</li>
{{end}}
{{end}}
{{if .Meta.Pager.PageCurr.Next}}
<li class="page-item">
<a class="page-link" href="{{.Meta.Pager.PageCurr.Next.File.Path}}" tabindex="-1">Next</a>
</li>
{{else}}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Next</a>
</li>
{{end}}
</ul>
{{end}}
</div>
{{template "footer" .}}
{{end}}