itsdrike.com/layouts/_default/list.html

23 lines
847 B
HTML
Raw Normal View History

2021-08-24 18:06:02 +00:00
{{ define "main" }}
2021-08-25 09:53:41 +00:00
<div id="main">
<div class="container">
{{ partial "content.html" . }}
2021-08-24 17:49:26 +00:00
2021-08-25 09:53:41 +00:00
<!--Group posts by months-->
{{ range .Pages.GroupByDate "2006-01" }}
{{ $month := print .Key "-01"}}
{{ $display := dateFormat "2006-01" $month }}
<h3 class="mt-5" id="{{ $display }}">
<a href="#{{ $display }}">
<time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ $display }}</time>
</a>
</h3>
<!--List posts belonging to current month -->
{{ range (sort .Pages "Date" "desc") }}
{{ partial "list_item.html" . }}
{{ end }}
{{ end }}
</div>
</div>
2021-08-24 18:06:02 +00:00
{{ end }}