fix posts list
This commit is contained in:
parent
14b5e092f2
commit
3a780ebefe
1 changed files with 6 additions and 1 deletions
|
@ -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">
|
||||||
|
{{ if eq $listtitle "Posts" }}
|
||||||
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
|
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||||
|
{{ else }}
|
||||||
|
<a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue