@ -29,6 +29,29 @@
< / section >
< / section >
< hr / >
< section class = "panel panel-default" >
< div class = "panel-heading" >
< b > Categories< / b >
< div style = "float: right" > < a href = "{{ " / category / " | relLangURL } } " > - full list -< / a > < / div >
< / div >
{{ if not (eq (len $.Site.Taxonomies.category) 0) }}
{{ $fontUnit := "rem" }}
{{ $largestFontSize := 1.6 }}
{{ $smallestFontSize := 1.0 }}
{{ $max := len (index $.Site.Taxonomies.category.ByCount 0).Pages }}
{{ $min := len (index $.Site.Taxonomies.category.ByCount.Reverse 0).Pages }}
< div id = "category-cloud" >
{{ range $name, $taxonomy := $.Site.Taxonomies.category }}
{{ $count := len $taxonomy.Pages }}
{{ $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
{{ $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) }}
<!-- Current font size: {{$currentFontSize}} -->
{{if not (in (slice "1" "2" "3" "4" "5") $name)}}< a href = "{{ " / category / " | relLangURL } } { { $ name | urlize } } " style = "font-size:{{$currentFontSize}}{{$fontUnit}}" > {{ $name }}< / a > {{ end }}
{{ end }}
< / div >
{{ end }}
< / section >
< hr / >
< section class = "site-info" > © {{ now.Format "2006"}} | < a href = "https://creativecommons.org/licenses/by/4.0/" target = "_blank" > CC-BY 4.0< / a > | < a href = "{{ .Permalink }}index.xml" > < i class = "fa fa-rss fa-fw" aria-hidden = "true" title = "Blog RSS feed" > < / i > < / a > < br / >
Made with ❤ and < a href = "https://gohugo.io/" > Hugo< / a > < br / > by < a href = "https://jon.kelbie.scot" target = "_blank" > Jon Kelbie< / a > < / section >