]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
improve tag cloud font size scaling 85/head
authornodiscc <nodiscc@gmail.com>
Wed, 24 Dec 2014 19:00:17 +0000 (20:00 +0100)
committernodiscc <nodiscc@gmail.com>
Mon, 29 Dec 2014 01:59:35 +0000 (02:59 +0100)
 * use logarithmic scales
 * remove bold style

inc/shaarli.css
index.php

index e7396ccb3240ff0dc369dc67b029bf96f524e990..d52de925b58a36c0b98590f18554e8bc74f1ab06 100644 (file)
@@ -562,7 +562,6 @@ a.qrcode img {
 }
 
 #cloudtag a {
-    font-weight:bold;
     color: black;
     text-decoration: none;
 }
index 02a6725f918767b8164e91f2d5aa5a877d35a0c5..7843f2b8ede24f83b02bce9f7d090c3361ad6f48 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1251,8 +1251,9 @@ function renderPage()
         ksort($tags);
         $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'=>max(40*$value/$maxcount,8));
+            $tagList[$key] = array('count'=>$value,'size'=>log($value, 15) / log($maxcount, 30) * (22-6) + 6);
         }
         $PAGE = new pageBuilder;
         $PAGE->assign('linkcount',count($LINKSDB));