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>
<div class="mt-4"> <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>
<div class="mt-6 pt-2 blog-pagination"> <div class="mt-6 pt-2 blog-pagination">

View file

@ -9,10 +9,6 @@
{{ if .ammount }} {{ if .ammount }}
{{ $ammount = (cast.ToInt .ammount) }} {{ $ammount = (cast.ToInt .ammount) }}
{{ end }} {{ end }}
{{ if (.Get 2) }}
{{ debug.Dump (.Get 2) }}
{{ $ammount = (cast.ToInt (.Get 2) )}}
{{ end }}
{{ if (eq (len $allposts) 0) }} {{ if (eq (len $allposts) 0) }}
<div <div
class="section-error-container transition-child" class="section-error-container transition-child"
@ -25,7 +21,11 @@
{{ else }} {{ else }}
<div <div
class="articles"> 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 }}"> <a class=article href="{{ $article.RelPermalink }}">
<article> <article>
<div <div