| 1 | {{- define "main" -}} |
| 2 | {{- $weeklyPages := (where site.RegularPages "Type" "weekly").ByDate.Reverse -}} |
| 3 | <header class="page-header"> |
| 4 | {{- partial "breadcrumbs.html" . }} |
| 5 | <p class="section-topline">Weekly archive</p> |
| 6 | <h1>{{ .Title }}</h1> |
| 7 | {{- with (.Description | default .Params.summary) }} |
| 8 | <div class="post-description">{{ . }}</div> |
| 9 | {{- end }} |
| 10 | </header> |
| 11 | |
| 12 | {{- if .Content }} |
| 13 | <div class="post-content md-content"> |
| 14 | {{ .Content }} |
| 15 | </div> |
| 16 | {{- end }} |
| 17 | |
| 18 | <section class="weekly-archive" aria-labelledby="weekly-archive-heading"> |
| 19 | <div class="section-heading-row"> |
| 20 | <div> |
| 21 | <div class="section-topline">All editions</div> |
| 22 | <h2 id="weekly-archive-heading">{{ len $weeklyPages }} weekly issue{{ if ne (len $weeklyPages) 1 }}s{{ end }}</h2> |
| 23 | </div> |
| 24 | <a href="{{ `archive/` | absLangURL }}">Full site archive</a> |
| 25 | </div> |
| 26 | |
| 27 | <div class="weekly-archive-list"> |
| 28 | {{- range $weeklyPages -}} |
| 29 | <article class="weekly-archive-entry"> |
| 30 | <div class="weekly-archive-entry__meta"> |
| 31 | {{- with .Params.week }}<span>{{ . }}</span>{{- end }} |
| 32 | <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time> |
| 33 | </div> |
| 34 | <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3> |
| 35 | <p>{{ .Params.summary | default .Summary }}</p> |
| 36 | </article> |
| 37 | {{- end -}} |
| 38 | </div> |
| 39 | </section> |
| 40 | {{- end -}} |