feat: limit homepage latest posts to 4, fix total post count in CTA

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 16:26:10 +02:00
parent 10239ffe83
commit 16352b9152
+3 -3
View File
@@ -117,14 +117,14 @@
</div> </div>
<div class="relative z-10 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5"> <div class="relative z-10 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5">
{{- range first 8 $latest -}} {{- range first 4 $latest -}}
{{- partial "post-card.html" . -}} {{- partial "post-card.html" . -}}
{{- end -}} {{- end -}}
</div> </div>
{{- if gt (len $latest) 8 -}} {{- if gt (len $latest) 4 -}}
<div class="relative z-10 mt-14 text-center"> <div class="relative z-10 mt-14 text-center">
<a href="/posts/" class="btn btn-outline">View All {{ len $latest }} Posts {{ partial "icon.html" "arrow-right" }}</a> <a href="/posts/" class="btn btn-outline">View All {{ len $posts }} Posts {{ partial "icon.html" "arrow-right" }}</a>
</div> </div>
{{- end -}} {{- end -}}