This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
{{ 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> ({{ .Counter }})
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{{ define "content" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p>{{ .Description }}</p>
|
||||
<section class="grid">
|
||||
{{ range .Articles }}
|
||||
<article class="card">
|
||||
{{ if .Cover }}<img src="{{ .Cover }}" alt="">{{ end }}
|
||||
<h2><a href="/post/{{ .Slug }}">{{ .Title }}</a></h2>
|
||||
<p>{{ .Description }}</p>
|
||||
<small>{{ .Date.Format "02.01.2006" }} · {{ .Counter }} Aufrufe · {{ .Format }}</small>
|
||||
</article>
|
||||
{{ else }}
|
||||
<p>Noch keine Artikel.</p>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user