fix posts list

This commit is contained in:
morph 2020-05-26 17:39:14 +02:00
parent 14b5e092f2
commit 3a780ebefe

View file

@ -1,5 +1,6 @@
{{ define "main" }} {{ define "main" }}
<main> <main>
{{ $listtitle := .Title }}
{{ if or .Title .Content }} {{ if or .Title .Content }}
<div> <div>
{{ with .Title }}<h1>{{ . }}</h1>{{ end }} {{ with .Title }}<h1>{{ . }}</h1>{{ end }}
@ -11,7 +12,11 @@
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
<li> <li>
<div class="post-title"> <div class="post-title">
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a> {{ if eq $listtitle "Posts" }}
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ end }}
</div> </div>
</li> </li>
{{ end }} {{ end }}