Files
blog/layouts/_partials/thoughts_preview.html
2026-11-05 11:58:07 +00:00

18 lines
736 B
HTML

{{- $thoughts := where site.RegularPages "Type" "thoughts" -}}
{{- $thoughts = $thoughts.ByDate.Reverse -}}
{{- with first 3 $thoughts -}}
<section class="thoughts-preview" aria-labelledby="thoughts-preview-heading">
<div class="thoughts-preview-header">
<h2 id="thoughts-preview-heading">Thoughts</h2>
<a class="thoughts-all-link" href="{{ "thoughts/" | relLangURL }}">All thoughts <span aria-hidden="true">&rarr;</span></a>
</div>
<div class="thoughts-grid">
{{- range . }}
<a class="thought-card" href="{{ "thoughts/" | relLangURL }}#{{ partial "thought_anchor.html" . }}">
<span class="thought-card-text">{{ partial "thought_text.html" . }}</span>
</a>
{{- end }}
</div>
</section>
{{- end -}}