itsdrike.com/layouts/posts/list.html

39 lines
1.3 KiB
HTML
Raw Permalink Normal View History

{{ define "main" }}
2022-05-11 12:04:08 +00:00
<div id="main">
2021-08-26 00:06:40 +00:00
<div class="container">
2022-05-11 12:28:46 +00:00
<!-- TODO:
- Mention total post amt
- Total words across posts
- link to tag list page (and maybe remove link from content-details),
- Link for Hugo generated RSS
-->
2022-05-11 12:04:08 +00:00
<div class="item-list">
{{ partial "content.html" . }}
<!-- Go through post groups by year -->
{{ range .Data.Pages.GroupByDate "2006" }}
{{ $year := .Key }}
<div class="item-list-group">
<!-- Show the year for this group -->
<h3 class="item-list-year" id="{{ $year }}">
<a href="#{{ $year }}">
<time datetime="{{ $year }}" title='{{ $year }}'>{{ $year }}</time>
</a>
</h3>
<!-- List all posts in this year group -->
<ul class="item-list-items">
{{ range .Pages }}
<li class="item-list-item" data-id="{{ with .File}}{{ .UniqueID }}{{ end }}">
{{ partial "list_item.html" (dict "context" . "dateformat" "Jan 02") }}
2022-05-11 12:04:08 +00:00
</li>
{{ end }}
</ul>
</div>
{{ end }}
</div>
</div>
2022-05-11 12:04:08 +00:00
</div>
{{ end }}