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>
|
<h1 class="display-4">{{ .Title }}</h1>
|
||||||
{{ range $paginator.PageGroups }}
|
{{ range $paginator.PageGroups }}
|
||||||
{{ $month := (print .Key "-01") }}
|
{{ $month := (print .Key "-01") }}
|
||||||
<h3 class="mt-5">
|
{{ if (index .Pages 0).Date.IsZero }}
|
||||||
<time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ dateFormat "2006-01" $month }}</time>
|
<hr class="my-5" />
|
||||||
</h3>
|
{{ 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") }}
|
{{ range (sort .Pages "Date" "desc") }}
|
||||||
{{ partial "list_item.html" . }}
|
{{ partial "list_item.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue