feat: simplify homepage to single hero, show all other posts in latest grid
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-20
@@ -1,9 +1,8 @@
|
||||
{{- define "main" -}}
|
||||
{{- $posts := where .Site.RegularPages "Section" "posts" -}}
|
||||
{{- $featured := where $posts "Params.featured" true -}}
|
||||
{{- $hero := index $featured 0 -}}
|
||||
{{- $secondary := after 1 $featured | first 3 -}}
|
||||
{{- $latest := complement $featured $posts -}}
|
||||
{{- $posts := where .Site.RegularPages "Section" "posts" -}}
|
||||
{{- $featured := where $posts "Params.featured" true -}}
|
||||
{{- $hero := index $featured 0 -}}
|
||||
{{- $latest := where $posts "Permalink" "ne" $hero.Permalink -}}
|
||||
|
||||
<!-- ── HERO ──────────────────────────────────────────────────── -->
|
||||
{{- with $hero -}}
|
||||
@@ -91,21 +90,6 @@
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
<!-- ── SECONDARY FEATURED ────────────────────────────────────── -->
|
||||
{{- with $secondary -}}
|
||||
<section class="gutter-x py-14 md:py-20">
|
||||
<div class="flex items-center gap-5 mb-8">
|
||||
<span class="badge badge-pulse">Also Featured</span>
|
||||
<div class="flex-1 gradient-line"></div>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-5">
|
||||
{{- range . -}}
|
||||
{{- partial "post-card-large.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
<div class="gradient-line" style="opacity:0.2"></div>
|
||||
|
||||
<!-- ── LATEST POSTS ──────────────────────────────────────────── -->
|
||||
|
||||
Reference in New Issue
Block a user