Files
2026-10-05 06:13:52 -06:00

21 lines
992 B
HTML

{{/*
"What's new": a grid of linked cards. `items`, each with `tag` (e.g.
Blog, Video, Event), `title`, optional `date`, `url`, and `image`
(a gradient panel shows without one).
*/}}
{{ $s := . }}
{{ partial "sections/head.html" $s }}
<ul class="news-grid">
{{ range $i, $n := $s.items }}
<li>
<a class="news-card" href="{{ $n.url | default "#" | relURL }}">
{{ with $n.image }}<img class="news-visual" src="{{ . | relURL }}" alt="" loading="lazy">
{{ else }}<span class="news-visual card-art" style="--i:{{ $i }}" aria-hidden="true">{{ if eq $n.tag "Video" }}<span class="news-play"></span>{{ end }}</span>{{ end }}
<span class="news-meta">{{ with $n.tag }}<span class="news-tag">{{ . }}</span>{{ end }}{{ with $n.date }}<span class="news-date">{{ . }}</span>{{ end }}</span>
<span class="news-title">{{ $n.title }}</span>
</a>
</li>
{{ end }}
</ul>
{{ if $s.ctas }}<div class="cta-row">{{ partial "sections/ctas.html" $s.ctas }}</div>{{ end }}