mirror of
https://github.com/vale981/smol
synced 2025-03-04 09:01:38 -05:00
dates for lists
This commit is contained in:
parent
61bc320784
commit
7ea0a1e26b
1 changed files with 21 additions and 21 deletions
|
@ -1,26 +1,26 @@
|
|||
{{ define "main" }}
|
||||
<main>
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<ul>
|
||||
{{ range .Paginator.Pages }}
|
||||
<li>
|
||||
<div class="post-title">
|
||||
{{ if not (or (eq $listtitle "Categories") (eq $listtitle "Tags")) }}
|
||||
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<ul>
|
||||
{{ range .Paginator.Pages }}
|
||||
<li>
|
||||
<div class="post-title">
|
||||
{{ if eq $listtitle "Posts" }}
|
||||
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Reference in a new issue