Skip to content

Commit 4ad8a31

Browse files
committed
Fix pagination on the main page
1 parent 76c66c4 commit 4ad8a31

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

layouts/index.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77

88
<section class="px-6 sm:px-10 pt-14 lg:pt-24">
99
<div class="mx-auto max-w-md sm:max-w-3xl lg:max-w-7xl">
10-
<h1 class="text-2xl sm:text-3xl lg:text-4xl font-bold text-sky-990">Featured</h1>
10+
<h1 class="text-2xl sm:text-3xl lg:text-4xl font-bold text-sky-990">Featured templates</h1>
11+
Select a category below to search for more templates
1112
<div class="flex flex-col lg:flex-row gap-8 lg:gap-10 mt-6">
1213
<div>
1314
{{ partial "nav-tags.html" . }}
1415
</div>
1516
<div class="flex-1">
16-
{{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections ) }}
17+
{{ $paginator := .Paginate (where site.RegularPages "Params.tags" "intersect" (slice "featured") ) }}
1718
<div class="grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
1819
{{ range $paginator.Pages }}
19-
{{ if in .Params.tags "featured" }}
20-
{{ partial "card-api.html" . }}
21-
{{ end }}
20+
{{ partial "card-api.html" . }}
2221
{{ end }}
2322
</div>
2423
<div class="mt-10">

0 commit comments

Comments
 (0)