Passt so
This commit is contained in:
16
internal/web/templates/list.html
Normal file
16
internal/web/templates/list.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ define "list" }} {{/* ‑‑ ausführbarer Entry‑Point */}}
|
||||
{{ template "base.html" . }} {{/* ruft das Layout auf */}}
|
||||
{{ end }}
|
||||
|
||||
{{ define "title" }}Alle Artikel{{ end }}
|
||||
|
||||
{{ define "body" }}
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li>
|
||||
<a href="/post/{{ .Slug }}">{{ .Title }}</a>
|
||||
— {{ .Date.Format "02.01.2006" }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
Reference in New Issue
Block a user