summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/archie/layouts/_default/terms.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/themes/archie/layouts/_default/terms.html b/themes/archie/layouts/_default/terms.html
new file mode 100644
index 0000000..fea9c2f
--- /dev/null
+++ b/themes/archie/layouts/_default/terms.html
@@ -0,0 +1,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 }}