all repos — archie @ dd1c9af419865b0a2048dbdc29b535d6448f9466

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		{{ range $key, $value := .Data.Terms.ByCount }}
20			{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
21			{{ $size := (cond (eq $biggest $smallest) $min $size) }}
22			<a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a>
23		{{ end }}
24		</div>
25	</div>
26
27	{{ partial "footer.html" . }}
28</body>
29
30</html>