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

53 lines
1.5 KiB
HTML
Raw Normal View History

2017-12-10 17:50:36 +00:00
{{define "collection"}}
{{template "header" .}}
{{template "navbar" .}}
<div class="container">
2017-12-28 21:10:05 +00:00
{{range .Meta.Pager.PageCurr.Items}}
2017-12-28 20:14:22 +00:00
<div>
<h1><a href="{{.Path}}">{{.Meta.Title}}</a></h1>
<p>
{{.Meta.Summary.Intro}}
<a href="{{.Path}}">[&hellip;more]</a>
</p>
</div>
2017-12-10 17:50:36 +00:00
{{end}}
2017-12-28 20:14:22 +00:00
2017-12-28 21:54:46 +00:00
{{if .Meta.Pager.Paged}}
2017-12-28 21:10:05 +00:00
<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>
2017-12-28 20:14:22 +00:00
</li>
2017-12-28 21:10:05 +00:00
{{else}}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Previous</a>
2017-12-28 20:14:22 +00:00
</li>
{{end}}
2017-12-28 21:10:05 +00:00
{{range .Meta.Pager.PagesAll}}
2017-12-29 18:35:43 +00:00
{{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}}
2017-12-28 21:10:05 +00:00
{{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>
2017-12-28 20:14:22 +00:00
</li>
2017-12-28 21:10:05 +00:00
{{else}}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Next</a>
</li>
{{end}}
2017-12-28 20:14:22 +00:00
</ul>
2017-12-28 21:54:46 +00:00
{{end}}
2017-12-10 17:50:36 +00:00
</div>
{{template "footer" .}}
{{end}}