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:
+1
-17
@@ -2,8 +2,7 @@
|
|||||||
{{- $posts := where .Site.RegularPages "Section" "posts" -}}
|
{{- $posts := where .Site.RegularPages "Section" "posts" -}}
|
||||||
{{- $featured := where $posts "Params.featured" true -}}
|
{{- $featured := where $posts "Params.featured" true -}}
|
||||||
{{- $hero := index $featured 0 -}}
|
{{- $hero := index $featured 0 -}}
|
||||||
{{- $secondary := after 1 $featured | first 3 -}}
|
{{- $latest := where $posts "Permalink" "ne" $hero.Permalink -}}
|
||||||
{{- $latest := complement $featured $posts -}}
|
|
||||||
|
|
||||||
<!-- ── HERO ──────────────────────────────────────────────────── -->
|
<!-- ── HERO ──────────────────────────────────────────────────── -->
|
||||||
{{- with $hero -}}
|
{{- with $hero -}}
|
||||||
@@ -91,21 +90,6 @@
|
|||||||
</section>
|
</section>
|
||||||
{{- end -}}
|
{{- 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>
|
<div class="gradient-line" style="opacity:0.2"></div>
|
||||||
|
|
||||||
<!-- ── LATEST POSTS ──────────────────────────────────────────── -->
|
<!-- ── LATEST POSTS ──────────────────────────────────────────── -->
|
||||||
|
|||||||
Reference in New Issue
Block a user