blog/layouts/section/memos.html

24 lines
810 B
HTML

{{ define "main" }}
<div class="pages--memo">
{{- range (where (where .Site.Pages "Type" "in" "memo") "Kind" "page").GroupByDate "2006" }}
{{ if (where .Pages "Section" "memo") }}
<h2 class="memos--title__year">{{ .Key }}</h2>
{{ range .Pages.ByPublishDate.Reverse.GroupByDate "January" }}
<h3 class="memos--title__month">{{ .Key }}</h3>
<ul class="memos--list">
{{ range ((where .Pages "Section" "memo")) }}
<li class="memos--item">
<div class="memo--title">
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</div>
<div class="memos--meta">{{ .PublishDate.Format "Jan 02" }}</div>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}