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

tag-cloud.html « component « main « partials « layouts - github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8c39940b3112c90d8c88d683a4493e952f7ea93d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{{ $totalTag := (len .Site.Taxonomies.tags) }}
<h6 class="tag-cloud__label">
  {{ .Title }}
</h6>
<div class="tag-cloud__tags">
  {{ range $index, $element := .Site.Taxonomies.tags }}
    {{ if $index }}
      <a href="{{ $element.Page.RelPermalink }}" class="tag">
        <span class="tag__text" style="font-size: {{ add 0.8 (div (len $element) (mul 1.0 $totalTag)) }}rem;">
          {{ $element.Page.Title }}
        </span>
        <span class="tag__num" style="font-size: {{ add 0.8 (div (len $element) (mul 1.0 $totalTag)) }}rem;" dir="auto">
          ({{ printf "%#v" (len $element) }})
        </span>
      </a>
    {{ end }}
  {{ end }}
</div>