This commit is contained in:
2025-05-04 14:16:29 +02:00
parent 92d272b36e
commit eb2d05f082
11 changed files with 202 additions and 38 deletions

View File

@@ -1,16 +1,23 @@
{{ define "list" }} {{/* ausführbarer EntryPoint */}}
{{ template "base.html" . }} {{/* ruft das Layout auf */}}
{{ end }}
{{ define "title" }}Alle Artikel{{ end }}
{{ define "body" }}
<ul>
<ul class="post-list" style="list-style:none; padding:0; display:grid; gap:var(--gap);">
{{ range . }}
<li>
<a href="/post/{{ .Slug }}">{{ .Title }}</a>
{{ .Date.Format "02.01.2006" }}
<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 }}