Skip to content

Commit

Permalink
Merge pull request shaarli#85 from nodiscc/tagcloud-scaling
Browse files Browse the repository at this point in the history
improve tag cloud font size scaling
  • Loading branch information
nodiscc committed Dec 29, 2014
2 parents 3259f1a + 1e3b274 commit f8d83b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion inc/shaarli.css
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@ a.qrcode img {
}

#cloudtag a {
font-weight:bold;
color: black;
text-decoration: none;
}
Expand Down
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,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));
Expand Down

0 comments on commit f8d83b3

Please sign in to comment.