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

24 lines
765 B
HTML
Raw Normal View History

2017-10-25 22:09:16 +01:00
{{ 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") }}
2018-02-22 20:34:01 +00:00
{{ if (index .Pages 0).Date.IsZero }}
<hr class="my-5" />
{{ else }}
2018-02-22 20:51:46 +00:00
<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>
2018-02-22 20:34:01 +00:00
</h3>
{{ end }}
2017-12-31 15:53:19 +00:00
{{ range (sort .Pages "Date" "desc") }}
2017-10-27 22:56:44 +01:00
{{ partial "list_item.html" . }}
2017-10-25 22:09:16 +01:00
{{ end }}
{{ end }}
</div>
</div>
{{ end }}