diff options
author | Urja Acharya <urja.acharya@huskers.unl.edu> | 2020-05-23 23:44:46 +0300 |
---|---|---|
committer | Urja Acharya <urja.acharya@huskers.unl.edu> | 2020-05-23 23:44:46 +0300 |
commit | e85caeeda5220ab7a7595e9734419f8c1de56e86 (patch) | |
tree | c5088e58b76113dea19542054300cdfd42599184 /layouts/partials/taxa.html |
Initial Commit
Diffstat (limited to 'layouts/partials/taxa.html')
-rw-r--r-- | layouts/partials/taxa.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/layouts/partials/taxa.html b/layouts/partials/taxa.html new file mode 100644 index 0000000..719d362 --- /dev/null +++ b/layouts/partials/taxa.html @@ -0,0 +1,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 }}" aria-label="site taxonomies">{{ .Page.Title }}</a> + {{ end }} +</div> +{{ end }} |