43 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{ define "main" }}
 | 
						|
  <main class="main--list main--photostream">
 | 
						|
    <header class="page-header">
 | 
						|
      {{ partial "page_header.html" (dict "page" .) }}
 | 
						|
    </header>
 | 
						|
 | 
						|
    {{/* 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)
 | 
						|
        )
 | 
						|
    -}}
 | 
						|
 | 
						|
    {{- .Content -}}
 | 
						|
 | 
						|
    {{ range $expandedYears }}
 | 
						|
      <section class="photostream-grid">
 | 
						|
        <header id="{{ .Date | time.Format "2006" }}" class="photostream-grid__date-heading">
 | 
						|
          <h2><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></h2>
 | 
						|
        </header>
 | 
						|
        {{ range .RegularPagesRecursive.ByPublishDate.Reverse -}}
 | 
						|
          {{ .Render "page_summary" }}
 | 
						|
        {{ end }}
 | 
						|
      </section>
 | 
						|
    {{ end }}
 | 
						|
 | 
						|
    {{ with $collapsedYears -}}
 | 
						|
      <h2 id="older">{{ i18n "olderPagesSectionTitle" }}</h2>
 | 
						|
      <ul>
 | 
						|
        {{ range . -}}
 | 
						|
          <li><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></li>
 | 
						|
        {{ end }}
 | 
						|
      </ul>
 | 
						|
    {{ end }}
 | 
						|
  </main>
 | 
						|
{{ end }}
 |