Replace zero date with hr
This commit is contained in:
parent
7daff47eaf
commit
8056c37d92
1 changed files with 7 additions and 3 deletions
|
@ -5,9 +5,13 @@
|
|||
<h1 class="display-4">{{ .Title }}</h1>
|
||||
{{ range $paginator.PageGroups }}
|
||||
{{ $month := (print .Key "-01") }}
|
||||
<h3 class="mt-5">
|
||||
<time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ dateFormat "2006-01" $month }}</time>
|
||||
</h3>
|
||||
{{ if (index .Pages 0).Date.IsZero }}
|
||||
<hr class="my-5" />
|
||||
{{ else }}
|
||||
<h3 class="mt-5">
|
||||
<time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ dateFormat "2006-01" $month }}</time>
|
||||
</h3>
|
||||
{{ end }}
|
||||
{{ range (sort .Pages "Date" "desc") }}
|
||||
{{ partial "list_item.html" . }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue