summaryrefslogtreecommitdiff
path: root/layouts/_default/terms.html
blob: fea9c2f798e4c1844d181a0087de193a6179545a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{{ define "main" }}
<h1 class="page-title">All tags</h1>

{{ $biggest := 1 }}
{{ $smallest := 1 }}
{{ $max := 3 }}
{{ $min := 1 }}
{{ $size := $min }}

{{ $data := .Data }}
<div class="tag-cloud">
	<ul class="tags">
		{{ range $key, $value := .Data.Terms.ByCount }}
		{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
		{{ $size := (cond (eq $biggest $smallest) $min $size) }}
		<li><a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a></li>
		{{ end }}
	</ul>
</div>
{{ end }}