diff options
author | Julio Capote <jcapote@gmail.com> | 2018-11-06 02:49:16 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2018-11-06 02:49:16 +0000 |
commit | a62a3e7755579d93ce3a87243dd277575930fffe (patch) | |
tree | 6d074f7294c5b7a45bed7ac229a6802830da2a04 /themes/even/layouts/_default/terms.html | |
download | capotej.com-a62a3e7755579d93ce3a87243dd277575930fffe.tar.gz |
init
Diffstat (limited to 'themes/even/layouts/_default/terms.html')
-rw-r--r-- | themes/even/layouts/_default/terms.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/themes/even/layouts/_default/terms.html b/themes/even/layouts/_default/terms.html new file mode 100644 index 0000000..04b98f8 --- /dev/null +++ b/themes/even/layouts/_default/terms.html @@ -0,0 +1,44 @@ +{{ define "title" }}{{ T .Data.Plural }} - {{ .Site.Title }}{{ end }} + +{{ define "content" }} + {{ $name := .Data.Plural -}} + {{ $terms := .Data.Terms.ByCount -}} + {{ $length := len $terms -}} + {{ if eq $name "categories" }} + <div class="categories"> + <div class="categories-title"> + {{ if eq $length 0 }} + {{ T "zeroCategoryCounter" }} + {{ else }} + {{ T "categoryCounter" $length }} + {{ end }} + </div> + <div class="categories-tags"> + {{ range $key, $value := $terms }} + <a class="category-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}/"> + {{ $value.Term }} + <span class="category-count">{{ len $value.Pages }}</span> + </a> + {{ end }} + </div> + </div> + {{ else if eq $name "tags" }} + <div class="tag-cloud"> + <div class="tag-cloud-title"> + {{ if eq $length 0 }} + {{ T "zeroTagCounter" }} + {{ else }} + {{ T "tagCounter" $length }} + {{ end }} + </div> + <div class="tag-cloud-tags"> + {{ range $key, $value := $terms }} + <a href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}/"> + {{ $value.Term }} + <span class="tag-count">{{ len $value.Pages }}</span> + </a> + {{ end }} + </div> + </div> + {{ end }} +{{ end }}
\ No newline at end of file |