archives.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {{ define "body-class" }}template-archives{{ end }}
  2. {{ define "main" }}
  3. <header>
  4. {{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
  5. {{- $terms := $taxonomy.Pages -}}
  6. {{ if $terms }}
  7. <h2 class="section-title">{{ $taxonomy.Title }}</h2>
  8. <div class="subsection-list">
  9. <div class="article-list--tile">
  10. {{ range $terms }}
  11. {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }}
  12. {{ end }}
  13. </div>
  14. </div>
  15. {{ end }}
  16. </header>
  17. {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
  18. {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
  19. {{ $filtered := ($pages | intersect $notHidden) }}
  20. {{ range $filtered.GroupByDate "2006" }}
  21. {{ $id := lower (replace .Key " " "-") }}
  22. <div class="archives-group" id="{{ $id }}">
  23. <h2 class="archives-date section-title"><a href="{{ $.RelPermalink }}#{{ $id }}">{{ .Key }}</a></h2>
  24. <div class="article-list--compact">
  25. {{ range .Pages }}
  26. {{ partial "article-list/compact" . }}
  27. {{ end }}
  28. </div>
  29. </div>
  30. {{ end }}
  31. {{ partialCached "footer/footer" . }}
  32. {{ end }}