X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=735615ff7b084326aef7dc8dfee611021b73fe3a;hb=b0128609f4b29c55d86152f3d0ff4b4e07bbcbf8;hp=dfc00fbd6c5d437ef8e074494e7443f7f0067673;hpb=5f143b72eaafeda533fcb997ecca73d38258546e;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index dfc00fbd..735615ff 100644 --- a/index.php +++ b/index.php @@ -1015,11 +1015,16 @@ function renderPage() return strcasecmp($a, $b); }); - $tagList=array(); - foreach($tags as $key=>$value) - // Tag font size scaling: default 15 and 30 logarithm bases affect scaling, 22 and 6 are arbitrary font sizes for max and min sizes. - { - $tagList[$key] = array('count'=>$value,'size'=>log($value, 15) / log($maxcount, 30) * (22-6) + 6); + $tagList = array(); + foreach($tags as $key => $value) { + // Tag font size scaling: + // default 15 and 30 logarithm bases affect scaling, + // 22 and 6 are arbitrary font sizes for max and min sizes. + $size = log($value, 15) / log($maxcount, 30) * 2.2 + 0.8; + $tagList[$key] = array( + 'count' => $value, + 'size' => number_format($size, 2, '.', ''), + ); } $data = array(