eeeeeeeeee

This commit is contained in:
GZod01 2024-05-18 19:12:11 +02:00
parent 9b46dc5ce0
commit 51aafecb8f
2 changed files with 6 additions and 6 deletions

View file

@ -64,7 +64,7 @@
</div>
<div class="mt-4">
{{partial "articles.html" (dict "Paging" true "context" . "ammount" 9) 5}}
{{partial "articles.html" (dict "Paging" true "context" . "ammount" 9 "pagination" true) 5}}
</div>
<div class="mt-6 pt-2 blog-pagination">

View file

@ -9,10 +9,6 @@
{{ if .ammount }}
{{ $ammount = (cast.ToInt .ammount) }}
{{ end }}
{{ if (.Get 2) }}
{{ debug.Dump (.Get 2) }}
{{ $ammount = (cast.ToInt (.Get 2) )}}
{{ end }}
{{ if (eq (len $allposts) 0) }}
<div
class="section-error-container transition-child"
@ -25,7 +21,11 @@
{{ else }}
<div
class="articles">
{{ range $index, $article := ($context.Page.Paginate $allposts (cast.ToInt $ammount)).Pages }}
{{ $pageslist := (first $ammount $allposts )}}
{{ if .pagination }}
{{ $pageslist = ($context.Page.Paginate $allposts (cast.ToInt $ammount)).Pages }}
{{ end }}
{{ range $index, $article := $pageslist }}
<a class=article href="{{ $article.RelPermalink }}">
<article>
<div