visualizza tag nascoste
All checks were successful
Linting markdown on PR / unicode-check (pull_request) Successful in 1m40s

This commit is contained in:
Paolo Asperti 2024-09-21 13:27:01 +02:00
parent cb64ffe02c
commit 0edfafdf7b
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -1,4 +1,13 @@
<section> <section>
<script>
function show_all_tags(e) {
$(".tags-sidebar li").css("display","inline-block");
$(e).css("display","none");
return false;
}
</script>
{{- $hiddenTags := slice "Linuxday-Featured" -}} {{- $hiddenTags := slice "Linuxday-Featured" -}}
<h3>Tags</h3> <h3>Tags</h3>
<ul class="tags-sidebar"> <ul class="tags-sidebar">
@ -38,11 +47,15 @@
{{/* range $tags.ByCount */}} {{/* range $tags.ByCount */}}
{{ range $tags.Alphabetical }} {{ range $tags.Alphabetical }}
{{ $c := len .Pages }} {{ $c := len .Pages }}
{{ $font_size := (add $font_min (mul $c $font_step)) }}
{{ if ge $c $count_min_display }} {{ if ge $c $count_min_display }}
{{ $font_size := (add $font_min (mul $c $font_step)) }}
<li style="font-size: {{ $font_size }}rem;"> <li style="font-size: {{ $font_size }}rem;">
<a href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }}</a><sup>{{ len .Pages }}</sup></li> <a href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }}</a><sup>{{ len .Pages }}</sup></li>
{{ end }} {{ else }}
<li style="font-size: {{ $font_size }}rem; display: none;">
<a href="/{{ .Page.Lang }}{{ .Page.Path }}">{{ .Page.LinkTitle | safeHTML }}</a><sup>{{ len .Pages }}</sup></li>
{{ end }} {{ end }}
{{ end }}
<li><a href="#" onclick="return show_all_tags(this)">...</a></li>
</ul> </ul>
</section> </section>