1
Fork 0
theorangeone.net-legacy/layouts/posts/list.html

23 lines
765 B
HTML

{{ define "main" }}
<div id="main">
<div class="container">
{{ $paginator := .Paginate (.Data.Pages.GroupByDate "2006-01") }}
<h1 class="display-4">{{ .Title }}</h1>
{{ range $paginator.PageGroups }}
{{ $month := (print .Key "-01") }}
{{ if (index .Pages 0).Date.IsZero }}
<hr class="my-5" />
{{ else }}
<h3 class="mt-5" id="{{ $month }}">
<a href="#{{ $month }}" class="no-color-change">
<time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ dateFormat "2006-01" $month }}</time>
</a>
</h3>
{{ end }}
{{ range (sort .Pages "Date" "desc") }}
{{ partial "list_item.html" . }}
{{ end }}
{{ end }}
</div>
</div>
{{ end }}