I have a menu with 12 items. The first two are “Full Height, Full Width”, the next 8 are “half height, half width”, the last two are “half-height, full width”
I don’t have a public repo I can share, but here’s the code I’ve got. It does exactly what I want, but I’m just curious if it could be simplified any:
<div class="home-table" style="--card-background-url: url({{ $image.RelPermalink }});">
{{ range first 2 $menu }}
<div class="card-full">
<a href="{{ .URL }}">
{{ .Name }}
</a>
</div>
{{ end }}
{{ range first 8 (after 2 $menu) }}
<div class="card">
<a href="{{ .URL }}">
{{ .Name }}
</a>
</div>
{{ end }}
{{ range last 2 $menu }}
<div class="card-wide">
<a href="{{ .URL }}">
{{ .Name }}
</a>
</div>
{{ end }}
</div>