Files
b1tsblog/internal/web/templates/list.html
2025-05-04 14:16:29 +02:00

24 lines
648 B
HTML

{{ define "title" }}Alle Artikel{{ end }}
{{ define "body" }}
<ul class="post-list" style="list-style:none; padding:0; display:grid; gap:var(--gap);">
{{ range . }}
<li>
<a class="card" href="/post/{{ .Slug }}">
{{ if .Cover }}
<img src="{{ .Cover }}" alt="">
{{ else }}
<img src="/static/img/placeholder.png" alt="">
{{ end }}
<div>
<h2>{{ .Title }}</h2>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
</div>
</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ define "list" }}{{ template "layout" . }}{{ end }}