Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dataCobra/hugo-vitae.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordataCobra <datacobra@thinkbot.de>2020-12-15 23:54:37 +0300
committerdataCobra <datacobra@thinkbot.de>2020-12-15 23:54:37 +0300
commit4a1fcb1370db35e5d68c6962cd674776e10769a4 (patch)
tree4688577a45b1989d2517ed918cc00ad923e99194
parent7413adacfc308e008ce0d705805ceb2d7ad88c65 (diff)
Fix #40 with an if condition
-rw-r--r--layouts/_default/terms.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 13024c4..252cb0f 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -4,6 +4,7 @@
{{ $max := len (index $.Site.Taxonomies.tags.ByCount 0).Pages }}
{{ $min := len (index $.Site.Taxonomies.tags.ByCount.Reverse 0).Pages }}
+ {{ if eq $max $min }}
{{ $maxFontSize := 2.5 }}
{{ $minFontSize := 1.0 }}
{{ $steps := div (sub $maxFontSize $minFontSize) (sub $max $min) }}
@@ -16,5 +17,6 @@
{{ $curFontSize := (add $minFontSize (mul (sub $maxFontSize $minFontSize) $weigth) ) }}
<a style="font-size: {{ $curFontSize }}rem;" href="{{ absURL $data.Plural }}/{{ $value.Name }}/">{{ $value.Name }}<sup>{{ $value.Count }}</sup></a>
{{ end }}
+ {{ end }}
</div>
{{ end }}