Welcome to mirror list, hosted at ThFree Co, Russian Federation.

taxa.html « partials « layouts - github.com/urjaacharya/redgood.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e0fe815e781a40a1da1cb8a86bf075cc1d89cd7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{ $scratch := newScratch }}
{{ $scratch.Delete "custom" }}
{{ range $name, $value := .taxo }}
{{ $scratch.Add "custom" (slice (dict "Name" $name "Value" $value "Num" (len $value))) }}
{{ end }}

{{ range sort ($scratch.Get "custom") ".Num" "desc" }}
{{ $taxaTypeName := .Name }}
<h3>
  {{ $taxaTypeName | humanize }}
</h3>
{{ $this_taxa := index $.taxo .Name }}
<div class="taxa-container home-page-card">
  {{ range $this_taxa.ByCount }}
  {{ $taxaValueName := .Page.Title }}
    <a class="taxa" href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
  {{ end }}
</div>
{{ end }}