diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-20 01:14:33 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-20 01:15:12 +0200 |
| commit | ab789fc20396bb583835c1f47478c1f17039d39f (patch) | |
| tree | c7c62acff7f2d404b5121807e78a2de3a94dc226 /layouts/_default/terms.html | |
| parent | d6736498de8885d446622dcafebeff033bc7b8c0 (diff) | |
| download | gohugo-theme-ed-ab789fc20396bb583835c1f47478c1f17039d39f.tar.gz | |
Provide minimal tag cloud
Diffstat (limited to 'layouts/_default/terms.html')
| -rw-r--r-- | layouts/_default/terms.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..20e8f29 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,29 @@ +{{ define "main" }} + +{{/* This template is for list of all Tags */}} +<div class="articles"> + <h1 class="page-title"> + {{ with .Title }} + {{ i18n "tag_cloud" . }} + {{ end }} + </h1> + + {{ $tags := site.Taxonomies.tags.ByCount }} + + <div class="tags-wrapper"> + <ul class="tags-cloud"> + {{ range uniq $tags }} + {{ if .Term }} + {{ $tagURL := printf "tags/%s" .Term | relURL }} + <li class="tag"> + <a class="tag-link" href="{{ $tagURL }}"> + {{ .Term }} ({{ .Count }}) + </a> + </li> + {{ end }} + {{ end }} + </ul> + </div> +</div> + +{{ end }} |
