diff options
Diffstat (limited to 'layouts/_default/terms.html')
-rwxr-xr-x | layouts/_default/terms.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100755 index 0000000..fea9c2f --- /dev/null +++ b/layouts/_default/terms.html | |||
@@ -0,0 +1,20 @@ | |||
1 | {{ define "main" }} | ||
2 | <h1 class="page-title">All tags</h1> | ||
3 | |||
4 | {{ $biggest := 1 }} | ||
5 | {{ $smallest := 1 }} | ||
6 | {{ $max := 3 }} | ||
7 | {{ $min := 1 }} | ||
8 | {{ $size := $min }} | ||
9 | |||
10 | {{ $data := .Data }} | ||
11 | <div class="tag-cloud"> | ||
12 | <ul class="tags"> | ||
13 | {{ range $key, $value := .Data.Terms.ByCount }} | ||
14 | {{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }} | ||
15 | {{ $size := (cond (eq $biggest $smallest) $min $size) }} | ||
16 | <li><a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a></li> | ||
17 | {{ end }} | ||
18 | </ul> | ||
19 | </div> | ||
20 | {{ end }} | ||