summaryrefslogtreecommitdiff
path: root/layouts/_default/terms.html
diff options
context:
space:
mode:
authorShubham Saini <me@ubh.sh>2023-02-09 00:19:28 +0000
committerShubham Saini <me@ubh.sh>2023-02-09 00:19:28 +0000
commitd7da16ecfa5cadb643df78694db44963ba665cbe (patch)
tree00c5234f542f7064e91827064767bcf59f094a2c /layouts/_default/terms.html
init
Diffstat (limited to 'layouts/_default/terms.html')
-rwxr-xr-xlayouts/_default/terms.html20
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 }}