implement pagination
This commit is contained in:
parent
6b05e21804
commit
d1dd42adb9
|
@ -7,12 +7,14 @@
|
|||
{{ .Content }}
|
||||
|
||||
<ul>
|
||||
{{ range (where .Data.Pages "Section" "!=" "") }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Section" "!=" "") }}
|
||||
{{ range $paginator.Pages }}
|
||||
<li>
|
||||
<span class="date">{{ .Date.Format "2006/01/02" }}</span>
|
||||
<a href="{{ .URL }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
|
|
@ -22,6 +22,11 @@ hr {
|
|||
color: #ddd;
|
||||
}
|
||||
|
||||
/* pagination */
|
||||
.pagination { text-align: center; }
|
||||
.pagination li { display: inline; }
|
||||
.pagination a { padding: 0 .2em; }
|
||||
|
||||
/* code */
|
||||
pre {
|
||||
border: 1px solid #ddd;
|
||||
|
|
Loading…
Reference in New Issue