hugo-theme-archie/layouts/_default/terms.html

31 lines
743 B
HTML
Raw Normal View History

2020-04-08 18:44:29 +00:00
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper tags">
{{ partial "head.html" . }}
<h1 class="page-title">All tags</h1>
{{ $biggest := 1 }}
{{ $smallest := 1 }}
{{ $max := 3 }}
{{ $min := 1 }}
{{ $size := $min }}
{{ $data := .Data }}
<div class="tag-cloud">
{{ range $key, $value := .Data.Terms.ByCount }}
{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
{{ $size := (cond (eq $biggest $smallest) $min $size) }}
<a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a>
{{ end }}
</div>
</div>
{{ partial "footer.html" . }}
</body>
</html>