all repos — archie @ 232d2ed0b61f7cf59159d731fbb50f533ee9149d

A minimal Hugo Theme

layouts/_default/terms.html (view raw)

 1<!DOCTYPE html>
 2<html>
 3{{ partial "header.html" . }}
 4
 5<body>
 6	<div class="container wrapper tags">
 7		{{ partial "head.html" . }}
 8
 9		<h1 class="page-title">All tags</h1>
10
11		{{ $biggest := 1 }}
12		{{ $smallest := 1 }}
13		{{ $max := 3 }}
14		{{ $min := 1 }}
15		{{ $size := $min }}
16
17		{{ $data := .Data }}
18		<div class="tag-cloud">
19		<ul>
20		{{ range $key, $value := .Data.Terms.ByCount }}
21			{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
22			{{ $size := (cond (eq $biggest $smallest) $min $size) }}
23			<li><a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a></li>
24		{{ end }}
25		</ul>
26		</div>
27		{{ partial "footer.html" . }}
28	</div>
29</body>
30
31</html>