mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-26 00:42:18 +00:00
implement basic pagination
This commit is contained in:
parent
51e99dddcc
commit
0d0832cab6
3 changed files with 16 additions and 3 deletions
|
@ -2,7 +2,7 @@ baseURL = "https://runtimeterror.dev"
|
||||||
theme = "risotto"
|
theme = "risotto"
|
||||||
title = "runtimeterror"
|
title = "runtimeterror"
|
||||||
copyright = "© 2018-2023 [runtimeterror](https://runtimeterror.dev)"
|
copyright = "© 2018-2023 [runtimeterror](https://runtimeterror.dev)"
|
||||||
paginate = 3
|
paginate = 10
|
||||||
languageCode = "en"
|
languageCode = "en"
|
||||||
DefaultContentLanguage = "en"
|
DefaultContentLanguage = "en"
|
||||||
enableInlineShortcodes = true
|
enableInlineShortcodes = true
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{ range $pages }}
|
{{- range (.Paginate $pages).Pages }}
|
||||||
{{- $postDate := .Date.Format "2006-01-02" }}
|
{{- $postDate := .Date.Format "2006-01-02" }}
|
||||||
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
||||||
<article class="post">
|
<article class="post">
|
||||||
|
@ -28,3 +28,4 @@
|
||||||
<br>
|
<br>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{- template "_internal/pagination.html" . }}
|
|
@ -156,4 +156,16 @@ body.dark .notice {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* pagination overrides */
|
||||||
|
ul.pagination li::marker {
|
||||||
|
content:'';
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.pagination li {
|
||||||
|
margin: 0 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
display:flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue