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

github.com/urjaacharya/redgood.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/taxa.html')
-rw-r--r--layouts/partials/taxa.html19
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 }}