mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-12-22 19:02:18 +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"
|
||||
title = "runtimeterror"
|
||||
copyright = "© 2018-2023 [runtimeterror](https://runtimeterror.dev)"
|
||||
paginate = 3
|
||||
paginate = 10
|
||||
languageCode = "en"
|
||||
DefaultContentLanguage = "en"
|
||||
enableInlineShortcodes = true
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{{ .Content }}
|
||||
</header>
|
||||
|
||||
{{ range $pages }}
|
||||
{{- range (.Paginate $pages).Pages }}
|
||||
{{- $postDate := .Date.Format "2006-01-02" }}
|
||||
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
||||
<article class="post">
|
||||
|
@ -27,4 +27,5 @@
|
|||
</section>
|
||||
<br>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- template "_internal/pagination.html" . }}
|
|
@ -156,4 +156,16 @@ body.dark .notice {
|
|||
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