aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2014-12-24 20:00:17 +0100
committernodiscc <nodiscc@gmail.com>2014-12-29 02:59:35 +0100
commit1e3b2740e522a8fde6bfef1030cd9b4a5eae0304 (patch)
tree8643f457acd94b8c8591e7745befef7627ae8851 /index.php
parent60b83e7cf763be3a68529f1d945710edaeb87967 (diff)
downloadShaarli-1e3b2740e522a8fde6bfef1030cd9b4a5eae0304.tar.gz
Shaarli-1e3b2740e522a8fde6bfef1030cd9b4a5eae0304.tar.zst
Shaarli-1e3b2740e522a8fde6bfef1030cd9b4a5eae0304.zip
improve tag cloud font size scaling
* use logarithmic scales * remove bold style
Diffstat (limited to 'index.php')
-rw-r--r--index.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.php b/index.php
index 02a6725f..7843f2b8 100644
--- a/index.php
+++ b/index.php
@@ -1251,8 +1251,9 @@ function renderPage()
1251 ksort($tags); 1251 ksort($tags);
1252 $tagList=array(); 1252 $tagList=array();
1253 foreach($tags as $key=>$value) 1253 foreach($tags as $key=>$value)
1254 // Tag font size scaling: default 15 and 30 logarithm bases affect scaling, 22 and 6 are arbitrary font sizes for max and min sizes.
1254 { 1255 {
1255 $tagList[$key] = array('count'=>$value,'size'=>max(40*$value/$maxcount,8)); 1256 $tagList[$key] = array('count'=>$value,'size'=>log($value, 15) / log($maxcount, 30) * (22-6) + 6);
1256 } 1257 }
1257 $PAGE = new pageBuilder; 1258 $PAGE = new pageBuilder;
1258 $PAGE->assign('linkcount',count($LINKSDB)); 1259 $PAGE->assign('linkcount',count($LINKSDB));