mirror of
https://github.com/yihui/hugo-xmin.git
synced 2024-11-22 16:39:19 +02:00
implement pagination
This commit is contained in:
parent
b76b60eb94
commit
7830711c21
|
@ -9,12 +9,14 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{ $pages := .Pages }}
|
{{ $pages := .Pages }}
|
||||||
{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
|
{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
|
||||||
{{ range (where $pages "Section" "!=" "") }}
|
{{ $paginator := .Paginate (where $pages "Section" "!=" "") }}
|
||||||
|
{{ range $paginator.Pages }}
|
||||||
<li>
|
<li>
|
||||||
<span class="date">{{ .Date.Format "2006/01/02" }}</span>
|
<span class="date">{{ .Date.Format "2006/01/02" }}</span>
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{ template "_internal/pagination.html" . }}
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
|
@ -22,6 +22,11 @@ hr {
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* pagination */
|
||||||
|
.pagination { text-align: center; }
|
||||||
|
.pagination li { display: inline; }
|
||||||
|
.pagination a { padding: 0 .2em; }
|
||||||
|
|
||||||
/* code */
|
/* code */
|
||||||
pre {
|
pre {
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
|
|
Loading…
Reference in New Issue