Umstellung auf dynamische Templates
This commit is contained in:
19
templates/list.html
Normal file
19
templates/list.html
Normal 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 }}
|
Reference in New Issue
Block a user