mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-09 17:42:19 +00:00
implement basic pagination
This commit is contained in:
parent
5af0ab3937
commit
5457716248
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">
|
||||||
|
@ -27,4 +27,5 @@
|
||||||
</section>
|
</section>
|
||||||
<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