Merge pull request #3 from legofarmer/master
Added pages for list sites
This commit is contained in:
commit
c9a444da9f
3 changed files with 48 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
{{ define "main" }}
|
||||
<div class="section">
|
||||
<dev class="section-title">{{.Section}}</dev>
|
||||
{{range .Pages}}
|
||||
{{ range $index, $element := .Paginator.Pages }}
|
||||
<div class="list-item">
|
||||
<a class="entry-title" href="{{ .URL }}">{{ .Title }}</a>
|
||||
{{$page := .}}
|
||||
|
@ -21,4 +21,5 @@
|
|||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{ partial "pagination.html" $ }}
|
||||
{{end}}
|
32
layouts/partials/pagination.html
Normal file
32
layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{ with $.Paginator }}
|
||||
{{ if gt .TotalPages 1 }}
|
||||
<ul class="pagination">
|
||||
{{ with .Prev }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ .URL }}">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="page-item">
|
||||
<a class="grayed-out" href="javascript:void()">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ with .Next }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ .URL }}">
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="page-item">
|
||||
<a class="grayed-out" href="javascript:void()">
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -283,6 +283,19 @@ blockquote {
|
|||
padding-top: 30px;
|
||||
border-top: 1px solid #3D3D3D;
|
||||
}
|
||||
|
||||
ul.pagination {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
list-style-type: none;
|
||||
font-size: 30px;
|
||||
margin-top: 50px;
|
||||
padding-top: 30px;
|
||||
border-top: 1px solid #3D3D3D;
|
||||
}
|
||||
|
||||
.nav-top:hover{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue