Group photos posts by month and year
This commit is contained in:
parent
454618222d
commit
c7a792182d
1 changed files with 11 additions and 8 deletions
|
@ -3,14 +3,17 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<section class="photos">
|
{{- $pages := (.Paginate (first 50 (.Pages.GroupByDate "January 2006"))).PageGroups -}}
|
||||||
<ul class="grid">
|
{{- range $pages -}}
|
||||||
{{- $pages = .Paginate (first 50 .Pages.ByDate) -}}
|
<section class="photos">
|
||||||
{{- range $pages.ByDate -}}
|
<h6>{{ .Key | title }}</h6>
|
||||||
{{- .Render "li_thumbnail_in_grid" -}}
|
<ul class="grid">
|
||||||
{{- end -}}
|
{{- range .Pages -}}
|
||||||
</ul>
|
{{- .Render "li_thumbnail_in_grid" -}}
|
||||||
</section>
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "footer" }}
|
{{ define "footer" }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue