tag cloud con font size variabile e soglia minima #247

Merged
paspo merged 3 commits from paspo/bglug.it:taglist_advanced into main 2024-09-23 20:09:40 +00:00
3 changed files with 7 additions and 5 deletions
Showing only changes of commit 4abcf3c2ef - Show all commits

View File

@ -9,3 +9,4 @@ subscribe_mailinglist: Subscribe to our mailing list
subscribe: Subscribe subscribe: Subscribe
come_and_see_us: Come and see us come_and_see_us: Come and see us
where: Where where: Where
more_tags: "...more"

View File

@ -9,3 +9,4 @@ subscribe_mailinglist: Iscriviti alla mailing list
subscribe: Iscriviti subscribe: Iscriviti
come_and_see_us: Vieni a trovarci come_and_see_us: Vieni a trovarci
where: Dove siamo where: Dove siamo
more_tags: "...altro"

View File

@ -49,13 +49,13 @@
{{ $c := len .Pages }} {{ $c := len .Pages }}
{{ $font_size := (add $font_min (mul $c $font_step)) }} {{ $font_size := (add $font_min (mul $c $font_step)) }}
{{ if ge $c $count_min_display }} {{ if ge $c $count_min_display }}
<li style="font-size: {{ $font_size }}rem;"> <li>
<a href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }}</a><sup>{{ len .Pages }}</sup></li> <a style="font-size: {{ $font_size }}rem;" href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }} ({{ len .Pages }})</a></li>
{{ else }} {{ else }}
<li style="font-size: {{ $font_size }}rem; display: none;"> <li style="display: none;">
<a href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }}</a><sup>{{ len .Pages }}</sup></li> <a style="font-size: {{ $font_size }}rem;" href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }} ({{ len .Pages }})</a></li>
{{ end }} {{ end }}
{{ end }} {{ end }}
<li><a href="#" onclick="return show_all_tags(this)">...</a></li> <li><a href="#" onclick="return show_all_tags(this)">{{ T "more_tags" }}</a></li>
</ul> </ul>
</section> </section>