| 1 | {{- define "main" -}} |
| 2 | <header class="page-header"> |
| 3 | {{- partial "breadcrumbs.html" . }} |
| 4 | <h1>{{ .Title }}</h1> |
| 5 | {{- with (.Description | default .Params.summary) }} |
| 6 | <div class="post-description">{{ . }}</div> |
| 7 | {{- end }} |
| 8 | </header> |
| 9 | |
| 10 | {{- if .Content }} |
| 11 | <div class="post-content md-content"> |
| 12 | {{ .Content }} |
| 13 | </div> |
| 14 | {{- end }} |
| 15 | |
| 16 | <section class="taxonomy-grid" aria-label="{{ .Title }} terms"> |
| 17 | {{- $type := .Type -}} |
| 18 | {{- range .Data.Terms.Alphabetical }} |
| 19 | {{- $term := .Name -}} |
| 20 | {{- $count := .Count -}} |
| 21 | {{- with site.GetPage (printf "/%s/%s" $type $term) }} |
| 22 | <article class="home-report-card taxonomy-card"> |
| 23 | <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> |
| 24 | <p>{{ .Params.summary | default (printf "Browse %d related page%s." $count (cond (eq $count 1) "" "s")) }}</p> |
| 25 | <div class="home-report-meta"> |
| 26 | <span>{{ $count }} page{{ if ne $count 1 }}s{{ end }}</span> |
| 27 | <span>{{ $type | humanize }}</span> |
| 28 | </div> |
| 29 | </article> |
| 30 | {{- end }} |
| 31 | {{- end }} |
| 32 | </section> |
| 33 | {{- end -}} |