{{ define "main" }}
<div class="small-wrapper">
  <main id="main">
    <h1>{{ .Title }}</h1>
    <ul class="patterns-list">
      {{ $type := .Type }}
      {{ range $key, $value := .Data.Terms.ByCount }}
        {{ $name := .Name }}
        {{ $count := .Count }}
        {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
        <li>
          <h2>
            <a href="{{ .Permalink }}">
              {{ printf "(%d) %s" $count $name }}
            </a>
          </h2>
        </li>
        {{ end }}
      {{ end }}
    </ul>
  </main>
</div>
{{ end }}
