diff --git a/inc/user.css b/inc/user.css index 2bb153e..741140e 100644 --- a/inc/user.css +++ b/inc/user.css @@ -40,12 +40,12 @@ pre code { position: static; margin-left: 130px; } -#linklist { +#linklist, #cloudtag { max-width: 80%; margin: 0 auto; padding: 0.3em; } -#linklist li { +#linklist li, #linklist li.private { padding: 0.3em; margin: 1em 0; border: 1px solid #cdcdcd; @@ -128,6 +128,29 @@ pre code { color: #555; } +#cloudtag { + background-color: #ababab; + border-radius:0.3em; +} + +#cloudtag > span { + padding: 0 0.3em; + color:#fff; + font-size:0.9em; +} + +#cloudtag a { + font-weight:bold; + color:black; + text-decoration:none +} + +#cloudtag a:hover { + font-weight:bold; + color:#ffffc9; + text-decoration:none +} + @media handheld, only screen and (max-width: 560px), only screen and (max-device-width: 854px) { #linklist { diff --git a/index.php b/index.php index 80623ed..f156401 100644 --- a/index.php +++ b/index.php @@ -1234,11 +1234,13 @@ function renderPage() // We sort tags alphabetically, then choose a font size according to count. // First, find max value. $maxcount=0; foreach($tags as $key=>$value) $maxcount=max($maxcount,$value); + $linkCount = count($LINKSDB); ksort($tags); $tagList=array(); foreach($tags as $key=>$value) { - $tagList[$key] = array('count'=>$value,'size'=>max(40*$value/$maxcount,8)); + //$tagList[$key] = array('count'=>$value,'size'=>max(40*$value/$maxcount,8)); + $tagList[$key] = array('count'=>$value,'size'=>round(min(max($maxcount*$value/$linkCount,0.8),4.5),2), 'max'=>$maxcount); } $PAGE = new pageBuilder; $PAGE->assign('linkcount',count($LINKSDB)); @@ -1936,7 +1938,7 @@ function computeThumbnail($url,$href=false) if ("/talks/" !== substr($path,0,7)) return array(); // This is not a single video URL. } $sign = hash_hmac('sha256', $url, $GLOBALS['salt']); // We use the salt to sign data (it's random, secret, and specific to each installation) - return array('src'=>indexUrl().'?do=genthumbnail&hmac='.htmlspecialchars($sign).'&url='.urlencode($url), + return array('src'=>indexUrl().'?do=genthumbnail&hmac='.htmlspecialchars($sign).'&url='.rawurlencode($url), 'href'=>$href,'width'=>'120','style'=>'height:auto;','alt'=>'thumbnail'); } diff --git a/tpl/tagcloud.html b/tpl/tagcloud.html index 3a69705..0856ccb 100644 --- a/tpl/tagcloud.html +++ b/tpl/tagcloud.html @@ -6,7 +6,7 @@
{loop="tags"} - {$value.count}{$key|htmlspecialchars} + {$value.count}{$key|htmlspecialchars} {/loop}