Umstellung auf dynamische Templates

This commit is contained in:
2025-05-10 19:01:12 +02:00
parent c1b6a0cbb3
commit 7630d1e033
5 changed files with 98 additions and 4 deletions

19
templates/list.html Normal file
View File

@@ -0,0 +1,19 @@
{{ define "body" }}
<ul class="post-list">
{{ range .Articles }}
<li>
<a class="card no-underline" href="/post/{{ .Slug }}">
{{ if .Cover }}
<img src="{{ .Cover }}" alt="">
{{ else }}
<img src="/static/img/placeholder.webp" alt="">
{{ end }}
<div class="card-content">
<h2>{{ .Title }}</h2>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
</div>
</a>
</li>
{{ end }}
</ul>
{{ end }}