2024-10-17 08:34:18 -07:00
|
|
|
{{ define "main" }}
|
|
|
|
<main class="main--list main--photostream">
|
|
|
|
<header class="page-header">
|
|
|
|
{{ partial "page_header.html" (dict "page" .) }}
|
|
|
|
</header>
|
|
|
|
|
2024-10-23 11:16:49 -07:00
|
|
|
{{/* Each page is a year section. */}}
|
|
|
|
{{- $yearPages := .Pages.ByPublishDate.Reverse -}}
|
|
|
|
{{- $yearLimit := math.Max ($.Site.Params.blog.yearLimit | default 5) 1 -}}
|
|
|
|
{{- $expandedYears := first $yearLimit $yearPages -}}
|
|
|
|
{{- $collapsedYears := after $yearLimit $yearPages -}}
|
|
|
|
|
|
|
|
{{-
|
|
|
|
partial "page/section_year_nav.html"
|
|
|
|
(dict
|
|
|
|
"years" $expandedYears
|
|
|
|
"includeCollapsedYearItem" (gt (len $collapsedYears) 0)
|
|
|
|
)
|
|
|
|
-}}
|
|
|
|
|
2024-10-17 08:34:18 -07:00
|
|
|
{{- .Content -}}
|
|
|
|
|
2024-10-23 11:16:49 -07:00
|
|
|
{{ range $expandedYears }}
|
2024-10-17 08:34:18 -07:00
|
|
|
<section class="photostream-grid">
|
2024-10-23 11:16:49 -07:00
|
|
|
<header id="{{ .Date | time.Format "2006" }}" class="photostream-grid__date-heading">
|
|
|
|
<h2><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></h2>
|
2024-10-17 08:34:18 -07:00
|
|
|
</header>
|
2024-10-23 11:16:49 -07:00
|
|
|
{{ range .RegularPagesRecursive.ByPublishDate.Reverse -}}
|
2024-10-17 08:34:18 -07:00
|
|
|
{{ .Render "page_summary" }}
|
|
|
|
{{ end }}
|
|
|
|
</section>
|
|
|
|
{{ end }}
|
2024-10-23 11:16:49 -07:00
|
|
|
|
|
|
|
{{ with $collapsedYears -}}
|
|
|
|
<h2 id="older">{{ i18n "olderPagesSectionTitle" }}</h2>
|
|
|
|
<ul>
|
|
|
|
{{ range . -}}
|
|
|
|
<li><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
2024-10-17 08:34:18 -07:00
|
|
|
</main>
|
|
|
|
{{ end }}
|