all repos — archie @ 7d19d8b66a0720298c4a05df70a2db634b034b90

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	
26<hr>
27	{{ partial "footer.html" . }}
28	</div>
29</body>
30
31</html>