From cb64ffe02c7dcdc7300fd0b7664cd606072b7867 Mon Sep 17 00:00:00 2001 From: paspo Date: Fri, 20 Sep 2024 19:50:36 +0000 Subject: [PATCH 1/3] tag cloud con font size variabile e soglia minima --- layouts/partials/sidebar/taglist.html | 45 ++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/layouts/partials/sidebar/taglist.html b/layouts/partials/sidebar/taglist.html index a27d20c..fc6e098 100644 --- a/layouts/partials/sidebar/taglist.html +++ b/layouts/partials/sidebar/taglist.html @@ -2,10 +2,47 @@ {{- $hiddenTags := slice "Linuxday-Featured" -}}

Tags

+ + {{ if lt $count_min $count_min_display }} + {{ $count_min = $count_min_display }} + {{ end }} + + {{ $count_delta := sub $count_max $count_min }} + {{ $font_delta := sub $font_max $font_min }} + {{ $font_step := div $font_delta $count_delta }} + + {{/* range $tags.ByCount */}} + {{ range $tags.Alphabetical }} + {{ $c := len .Pages }} + {{ if ge $c $count_min_display }} + {{ $font_size := (add $font_min (mul $c $font_step)) }} +
  • + {{ .Page.LinkTitle | safeHTML }}{{ len .Pages }}
  • + {{ end }} + {{ end }} + -- 2.45.2 From 0edfafdf7bd958af3bdd8aa44f69113b31d6031e Mon Sep 17 00:00:00 2001 From: paspo Date: Sat, 21 Sep 2024 13:27:01 +0200 Subject: [PATCH 2/3] visualizza tag nascoste --- layouts/partials/sidebar/taglist.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/layouts/partials/sidebar/taglist.html b/layouts/partials/sidebar/taglist.html index fc6e098..3dcb278 100644 --- a/layouts/partials/sidebar/taglist.html +++ b/layouts/partials/sidebar/taglist.html @@ -1,4 +1,13 @@
    + + {{- $hiddenTags := slice "Linuxday-Featured" -}}

    Tags

      @@ -38,11 +47,15 @@ {{/* range $tags.ByCount */}} {{ range $tags.Alphabetical }} {{ $c := len .Pages }} + {{ $font_size := (add $font_min (mul $c $font_step)) }} {{ if ge $c $count_min_display }} - {{ $font_size := (add $font_min (mul $c $font_step)) }}
    • {{ .Page.LinkTitle | safeHTML }}{{ len .Pages }}
    • - {{ end }} + {{ else }} +
    • + {{ .Page.LinkTitle | safeHTML }}{{ len .Pages }}
    • {{ end }} + {{ end }} +
    • ...
    -- 2.45.2 From 4abcf3c2efa458e89daf5aca24ceef982343a9ca Mon Sep 17 00:00:00 2001 From: paspo Date: Mon, 23 Sep 2024 20:18:28 +0200 Subject: [PATCH 3/3] tagcloud fix --- i18n/en.yaml | 1 + i18n/it.yaml | 1 + layouts/partials/sidebar/taglist.html | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 72a4720..498113d 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -9,3 +9,4 @@ subscribe_mailinglist: Subscribe to our mailing list subscribe: Subscribe come_and_see_us: Come and see us where: Where +more_tags: "...more" diff --git a/i18n/it.yaml b/i18n/it.yaml index 1e4b04e..47a5fe0 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -9,3 +9,4 @@ subscribe_mailinglist: Iscriviti alla mailing list subscribe: Iscriviti come_and_see_us: Vieni a trovarci where: Dove siamo +more_tags: "...altro" diff --git a/layouts/partials/sidebar/taglist.html b/layouts/partials/sidebar/taglist.html index 3dcb278..ea1fa9d 100644 --- a/layouts/partials/sidebar/taglist.html +++ b/layouts/partials/sidebar/taglist.html @@ -49,13 +49,13 @@ {{ $c := len .Pages }} {{ $font_size := (add $font_min (mul $c $font_step)) }} {{ if ge $c $count_min_display }} -
  • - {{ .Page.LinkTitle | safeHTML }}{{ len .Pages }}
  • +
  • + {{ .Page.LinkTitle | safeHTML }} ({{ len .Pages }})
  • {{ else }} -
  • - {{ .Page.LinkTitle | safeHTML }}{{ len .Pages }}
  • +
  • + {{ .Page.LinkTitle | safeHTML }} ({{ len .Pages }})
  • {{ end }} {{ end }} -
  • ...
  • +
  • {{ T "more_tags" }}
  • -- 2.45.2